diff --git a/.deploy.ini b/.deploy.ini index 7bbb0b2..e935692 100644 --- a/.deploy.ini +++ b/.deploy.ini @@ -1,6 +1,6 @@ [Misc] #if set to true, all logs from commands will be shown. Default is false. -verbose=false +verbose=true #if set to true, Travis will always try to build the package/asset, even when there isn't a tag. Default is true. always_run=true diff --git a/.gitignore b/.gitignore index e3842f0..8dd64e5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ -.svn -.git +Temp/* +Assembly* +*.sln +*.userprefs +/Library diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..16b6d7d --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "Assets/UnitySteer"] + path = Assets/UnitySteer + url = https://github.com/ricardojmendez/UnitySteer.git diff --git a/.travis.yml b/.travis.yml index 9e2befc..c796d17 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,23 @@ language: objective-c install: - - sh ./.deploy/travis/py_set_up.sh +- sh ./.deploy/travis/py_set_up.sh script: - - python ./.deploy/travis/main_parser.py +- python ./.deploy/travis/main_parser.py + +addons: + sonarqube: + organization: "odmehb-github" + token: + secure: "aCpEzF7VFed9bhZ1Lb/Jm4t+zvR3o2R8RyjNfwoN776ODi8NzDqt/R9nuZmSA2zfT6XNL4AacFAmEgjt52v27wdLwDTSqUW1w3s+xcVOj7uNj/MMap0FhtilJNE7VTyPtkhH+bVGPrjZaLvRHlqt/tYPbK4Pz7Y8RCz4wZrowOvLbt87lJUJsVM2/VbMZjrRm9M2JHzdbn6afTlquCQsIvsTQCIttP3mRAYEEUMTkO4CfdlxThRUJTc+8QmGD/avA9M56+FyRjo+sTVIsK49NYykn2opkosRPHIlGJHP3XmVss0srCuK1oUq4T+ZMDe0EvyIIGQtT+P4msbZVVb1PnlyWwHtDncRZI/ge+SpZlqzhJkT+RGj7fEe66LVXy162DZdMEu3lgCpyci6+kqAvDwj/sLlSqvBiAwpIuAnyd38l1cQtIFr6L9a3/Tx5x+eLi/9SbRZEoaR6io367FEGQMT7pfnyya045flfBbxD2mdGgJkz9iQqSubM5Oj4A5PXtEn52COJzeCxCcH8VEVSW7JJ67LsjLqEyFvl0c3B8YVsSENm02pFXuUMjZOHu+hOq1b9v799C7LXys6Q2CrK4IS4yipHOAudxbACy6vrTNaiovN1FBqQvkafmTmEy8RN/C72NmmWsqMWtsB9tqbkuqmMmwbXdMtMu/YGvnxG5Y=" + branches: + - master + - development + +script: + # other script steps might be done before running the actual SonarQube analysis + - sonar-scanner + +notifications: + slack: csapatnevteam:pOaxl7fQfoNZj97ERSgqZGL6 \ No newline at end of file diff --git a/Assets/MainScene.unity b/Assets/MainScene.unity new file mode 100644 index 0000000..e6307bc Binary files /dev/null and b/Assets/MainScene.unity differ diff --git a/Assets/MainScene.unity.meta b/Assets/MainScene.unity.meta new file mode 100644 index 0000000..4e931b8 --- /dev/null +++ b/Assets/MainScene.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0b254e901b0f10149adb697fca598d58 +timeCreated: 1493981697 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnitySteer.meta b/Assets/UnitySteer.meta new file mode 100644 index 0000000..a53cc06 --- /dev/null +++ b/Assets/UnitySteer.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4281987d9375d0a40ad0f27cf74d9446 +folderAsset: yes +timeCreated: 1493981616 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnitySteer/.gitignore b/Assets/UnitySteer/.gitignore new file mode 100644 index 0000000..e3842f0 --- /dev/null +++ b/Assets/UnitySteer/.gitignore @@ -0,0 +1,2 @@ +.svn +.git diff --git a/2D.meta b/Assets/UnitySteer/2D.meta similarity index 100% rename from 2D.meta rename to Assets/UnitySteer/2D.meta diff --git a/2D/Behaviors.meta b/Assets/UnitySteer/2D/Behaviors.meta similarity index 100% rename from 2D/Behaviors.meta rename to Assets/UnitySteer/2D/Behaviors.meta diff --git a/2D/Behaviors/AutonomousVehicle2D.cs b/Assets/UnitySteer/2D/Behaviors/AutonomousVehicle2D.cs similarity index 100% rename from 2D/Behaviors/AutonomousVehicle2D.cs rename to Assets/UnitySteer/2D/Behaviors/AutonomousVehicle2D.cs diff --git a/2D/Behaviors/AutonomousVehicle2D.cs.meta b/Assets/UnitySteer/2D/Behaviors/AutonomousVehicle2D.cs.meta similarity index 100% rename from 2D/Behaviors/AutonomousVehicle2D.cs.meta rename to Assets/UnitySteer/2D/Behaviors/AutonomousVehicle2D.cs.meta diff --git a/2D/Behaviors/Biped2D.cs b/Assets/UnitySteer/2D/Behaviors/Biped2D.cs similarity index 100% rename from 2D/Behaviors/Biped2D.cs rename to Assets/UnitySteer/2D/Behaviors/Biped2D.cs diff --git a/2D/Behaviors/Biped2D.cs.meta b/Assets/UnitySteer/2D/Behaviors/Biped2D.cs.meta similarity index 100% rename from 2D/Behaviors/Biped2D.cs.meta rename to Assets/UnitySteer/2D/Behaviors/Biped2D.cs.meta diff --git a/2D/Behaviors/DetectableObject2D.cs b/Assets/UnitySteer/2D/Behaviors/DetectableObject2D.cs similarity index 100% rename from 2D/Behaviors/DetectableObject2D.cs rename to Assets/UnitySteer/2D/Behaviors/DetectableObject2D.cs diff --git a/2D/Behaviors/DetectableObject2D.cs.meta b/Assets/UnitySteer/2D/Behaviors/DetectableObject2D.cs.meta similarity index 100% rename from 2D/Behaviors/DetectableObject2D.cs.meta rename to Assets/UnitySteer/2D/Behaviors/DetectableObject2D.cs.meta diff --git a/2D/Behaviors/PassiveVehicle2D.cs b/Assets/UnitySteer/2D/Behaviors/PassiveVehicle2D.cs similarity index 100% rename from 2D/Behaviors/PassiveVehicle2D.cs rename to Assets/UnitySteer/2D/Behaviors/PassiveVehicle2D.cs diff --git a/2D/Behaviors/PassiveVehicle2D.cs.meta b/Assets/UnitySteer/2D/Behaviors/PassiveVehicle2D.cs.meta similarity index 100% rename from 2D/Behaviors/PassiveVehicle2D.cs.meta rename to Assets/UnitySteer/2D/Behaviors/PassiveVehicle2D.cs.meta diff --git a/2D/Behaviors/Radar2D.cs b/Assets/UnitySteer/2D/Behaviors/Radar2D.cs similarity index 93% rename from 2D/Behaviors/Radar2D.cs rename to Assets/UnitySteer/2D/Behaviors/Radar2D.cs index 771993c..40a0587 100644 --- a/2D/Behaviors/Radar2D.cs +++ b/Assets/UnitySteer/2D/Behaviors/Radar2D.cs @@ -206,14 +206,14 @@ private void OnDisable() private void OnUpdateRadar(object obj) { - Profiler.BeginSample("OnUpdateRadar"); + UnityEngine.Profiling.Profiler.BeginSample("OnUpdateRadar"); _detectedColliders = Detect(); FilterDetected(); if (OnDetected != null) { - Profiler.BeginSample("Detection event handler"); + UnityEngine.Profiling.Profiler.BeginSample("Detection event handler"); OnDetected(this); - Profiler.EndSample(); + UnityEngine.Profiling.Profiler.EndSample(); } #if TRACEDETECTED if (DrawGizmos) @@ -237,7 +237,7 @@ private void OnUpdateRadar(object obj) Debug.Log(sb.ToString()); } #endif - Profiler.EndSample(); + UnityEngine.Profiling.Profiler.EndSample(); } public void UpdateRadar() @@ -264,14 +264,14 @@ protected virtual void FilterDetected() * took about 75% of the time used for the frame. * */ - Profiler.BeginSample("Base FilterDetected"); + UnityEngine.Profiling.Profiler.BeginSample("Base FilterDetected"); _vehicles.Clear(); _obstacles.Clear(); _detectedObjects.Clear(); - Profiler.BeginSample("Initial detection"); + UnityEngine.Profiling.Profiler.BeginSample("Initial detection"); for (var i = 0; i < _detectedColliders.Length; i++) { var id = _detectedColliders[i].GetInstanceID(); @@ -288,9 +288,9 @@ protected virtual void FilterDetected() _detectedObjects.Add(detectable); } } - Profiler.EndSample(); + UnityEngine.Profiling.Profiler.EndSample(); - Profiler.BeginSample("Filtering out vehicles"); + UnityEngine.Profiling.Profiler.BeginSample("Filtering out vehicles"); for (var i = 0; i < _detectedObjects.Count; i++) { var d = _detectedObjects[i]; @@ -304,8 +304,8 @@ protected virtual void FilterDetected() _obstacles.Add(d); } } - Profiler.EndSample(); - Profiler.EndSample(); + UnityEngine.Profiling.Profiler.EndSample(); + UnityEngine.Profiling.Profiler.EndSample(); } #endregion diff --git a/2D/Behaviors/Radar2D.cs.meta b/Assets/UnitySteer/2D/Behaviors/Radar2D.cs.meta similarity index 100% rename from 2D/Behaviors/Radar2D.cs.meta rename to Assets/UnitySteer/2D/Behaviors/Radar2D.cs.meta diff --git a/2D/Behaviors/SteerForAlignment2D.cs b/Assets/UnitySteer/2D/Behaviors/SteerForAlignment2D.cs similarity index 100% rename from 2D/Behaviors/SteerForAlignment2D.cs rename to Assets/UnitySteer/2D/Behaviors/SteerForAlignment2D.cs diff --git a/2D/Behaviors/SteerForAlignment2D.cs.meta b/Assets/UnitySteer/2D/Behaviors/SteerForAlignment2D.cs.meta similarity index 100% rename from 2D/Behaviors/SteerForAlignment2D.cs.meta rename to Assets/UnitySteer/2D/Behaviors/SteerForAlignment2D.cs.meta diff --git a/2D/Behaviors/SteerForCohesion2D.cs b/Assets/UnitySteer/2D/Behaviors/SteerForCohesion2D.cs similarity index 100% rename from 2D/Behaviors/SteerForCohesion2D.cs rename to Assets/UnitySteer/2D/Behaviors/SteerForCohesion2D.cs diff --git a/2D/Behaviors/SteerForCohesion2D.cs.meta b/Assets/UnitySteer/2D/Behaviors/SteerForCohesion2D.cs.meta similarity index 100% rename from 2D/Behaviors/SteerForCohesion2D.cs.meta rename to Assets/UnitySteer/2D/Behaviors/SteerForCohesion2D.cs.meta diff --git a/2D/Behaviors/SteerForEvasion2D.cs b/Assets/UnitySteer/2D/Behaviors/SteerForEvasion2D.cs similarity index 100% rename from 2D/Behaviors/SteerForEvasion2D.cs rename to Assets/UnitySteer/2D/Behaviors/SteerForEvasion2D.cs diff --git a/2D/Behaviors/SteerForEvasion2D.cs.meta b/Assets/UnitySteer/2D/Behaviors/SteerForEvasion2D.cs.meta similarity index 100% rename from 2D/Behaviors/SteerForEvasion2D.cs.meta rename to Assets/UnitySteer/2D/Behaviors/SteerForEvasion2D.cs.meta diff --git a/2D/Behaviors/SteerForFear2D.cs b/Assets/UnitySteer/2D/Behaviors/SteerForFear2D.cs similarity index 96% rename from 2D/Behaviors/SteerForFear2D.cs rename to Assets/UnitySteer/2D/Behaviors/SteerForFear2D.cs index 499796e..1a2daff 100644 --- a/2D/Behaviors/SteerForFear2D.cs +++ b/Assets/UnitySteer/2D/Behaviors/SteerForFear2D.cs @@ -65,7 +65,7 @@ protected override void Start() protected override Vector2 CalculateForce() { - Profiler.BeginSample("Accumulating repulsion"); + UnityEngine.Profiling.Profiler.BeginSample("Accumulating repulsion"); var accumulator = Vector2.zero; var totalCount = 0; var now = Time.time; @@ -98,7 +98,7 @@ protected override Vector2 CalculateForce() Debug.DrawLine(position, futurePosition, Color.blue); Debug.DrawLine(position + accumulator, futurePosition, Color.magenta); #endif - Profiler.EndSample(); + UnityEngine.Profiling.Profiler.EndSample(); return accumulator; } diff --git a/2D/Behaviors/SteerForFear2D.cs.meta b/Assets/UnitySteer/2D/Behaviors/SteerForFear2D.cs.meta similarity index 100% rename from 2D/Behaviors/SteerForFear2D.cs.meta rename to Assets/UnitySteer/2D/Behaviors/SteerForFear2D.cs.meta diff --git a/2D/Behaviors/SteerForFollow2D.cs b/Assets/UnitySteer/2D/Behaviors/SteerForFollow2D.cs similarity index 100% rename from 2D/Behaviors/SteerForFollow2D.cs rename to Assets/UnitySteer/2D/Behaviors/SteerForFollow2D.cs diff --git a/2D/Behaviors/SteerForFollow2D.cs.meta b/Assets/UnitySteer/2D/Behaviors/SteerForFollow2D.cs.meta similarity index 100% rename from 2D/Behaviors/SteerForFollow2D.cs.meta rename to Assets/UnitySteer/2D/Behaviors/SteerForFollow2D.cs.meta diff --git a/2D/Behaviors/SteerForForward2D.cs b/Assets/UnitySteer/2D/Behaviors/SteerForForward2D.cs similarity index 100% rename from 2D/Behaviors/SteerForForward2D.cs rename to Assets/UnitySteer/2D/Behaviors/SteerForForward2D.cs diff --git a/2D/Behaviors/SteerForForward2D.cs.meta b/Assets/UnitySteer/2D/Behaviors/SteerForForward2D.cs.meta similarity index 100% rename from 2D/Behaviors/SteerForForward2D.cs.meta rename to Assets/UnitySteer/2D/Behaviors/SteerForForward2D.cs.meta diff --git a/2D/Behaviors/SteerForMatchingVelocity2D.cs b/Assets/UnitySteer/2D/Behaviors/SteerForMatchingVelocity2D.cs similarity index 100% rename from 2D/Behaviors/SteerForMatchingVelocity2D.cs rename to Assets/UnitySteer/2D/Behaviors/SteerForMatchingVelocity2D.cs diff --git a/2D/Behaviors/SteerForMatchingVelocity2D.cs.meta b/Assets/UnitySteer/2D/Behaviors/SteerForMatchingVelocity2D.cs.meta similarity index 100% rename from 2D/Behaviors/SteerForMatchingVelocity2D.cs.meta rename to Assets/UnitySteer/2D/Behaviors/SteerForMatchingVelocity2D.cs.meta diff --git a/2D/Behaviors/SteerForMinimumSpeed2D.cs b/Assets/UnitySteer/2D/Behaviors/SteerForMinimumSpeed2D.cs similarity index 100% rename from 2D/Behaviors/SteerForMinimumSpeed2D.cs rename to Assets/UnitySteer/2D/Behaviors/SteerForMinimumSpeed2D.cs diff --git a/2D/Behaviors/SteerForMinimumSpeed2D.cs.meta b/Assets/UnitySteer/2D/Behaviors/SteerForMinimumSpeed2D.cs.meta similarity index 100% rename from 2D/Behaviors/SteerForMinimumSpeed2D.cs.meta rename to Assets/UnitySteer/2D/Behaviors/SteerForMinimumSpeed2D.cs.meta diff --git a/2D/Behaviors/SteerForNeighborGroup2D.cs b/Assets/UnitySteer/2D/Behaviors/SteerForNeighborGroup2D.cs similarity index 94% rename from 2D/Behaviors/SteerForNeighborGroup2D.cs rename to Assets/UnitySteer/2D/Behaviors/SteerForNeighborGroup2D.cs index a23f66c..26b8426 100644 --- a/2D/Behaviors/SteerForNeighborGroup2D.cs +++ b/Assets/UnitySteer/2D/Behaviors/SteerForNeighborGroup2D.cs @@ -168,7 +168,7 @@ protected override Vector2 CalculateForce() { // steering accumulator and count of neighbors, both initially zero var steering = Vector2.zero; - Profiler.BeginSample("SteerForNeighborGroup.Looping over neighbors"); + UnityEngine.Profiling.Profiler.BeginSample("SteerForNeighborGroup.Looping over neighbors"); // I'd prefer an iterator, but trying to cut down on allocations for (var i = 0; i < _neighbors.Count; i++) { @@ -185,7 +185,7 @@ protected override Vector2 CalculateForce() { Debug.DrawLine(Vehicle.Position, other.Position, Color.magenta); } - Profiler.BeginSample("SteerForNeighborGroup.Adding"); + UnityEngine.Profiling.Profiler.BeginSample("SteerForNeighborGroup.Adding"); for (var bi = 0; bi < _behaviors.Length; bi++) { var behavior = _behaviors[bi]; @@ -194,16 +194,16 @@ protected override Vector2 CalculateForce() steering += behavior.CalculateNeighborContribution(other) * behavior.Weight; } } - Profiler.EndSample(); + UnityEngine.Profiling.Profiler.EndSample(); } } ; - Profiler.EndSample(); + UnityEngine.Profiling.Profiler.EndSample(); - Profiler.BeginSample("Normalizing"); + UnityEngine.Profiling.Profiler.BeginSample("Normalizing"); // Normalize for pure direction steering.Normalize(); - Profiler.EndSample(); + UnityEngine.Profiling.Profiler.EndSample(); return steering; } diff --git a/2D/Behaviors/SteerForNeighborGroup2D.cs.meta b/Assets/UnitySteer/2D/Behaviors/SteerForNeighborGroup2D.cs.meta similarity index 100% rename from 2D/Behaviors/SteerForNeighborGroup2D.cs.meta rename to Assets/UnitySteer/2D/Behaviors/SteerForNeighborGroup2D.cs.meta diff --git a/2D/Behaviors/SteerForNeighbors2D.cs b/Assets/UnitySteer/2D/Behaviors/SteerForNeighbors2D.cs similarity index 100% rename from 2D/Behaviors/SteerForNeighbors2D.cs rename to Assets/UnitySteer/2D/Behaviors/SteerForNeighbors2D.cs diff --git a/2D/Behaviors/SteerForNeighbors2D.cs.meta b/Assets/UnitySteer/2D/Behaviors/SteerForNeighbors2D.cs.meta similarity index 100% rename from 2D/Behaviors/SteerForNeighbors2D.cs.meta rename to Assets/UnitySteer/2D/Behaviors/SteerForNeighbors2D.cs.meta diff --git a/2D/Behaviors/SteerForPathSimplified2D.cs b/Assets/UnitySteer/2D/Behaviors/SteerForPathSimplified2D.cs similarity index 100% rename from 2D/Behaviors/SteerForPathSimplified2D.cs rename to Assets/UnitySteer/2D/Behaviors/SteerForPathSimplified2D.cs diff --git a/2D/Behaviors/SteerForPathSimplified2D.cs.meta b/Assets/UnitySteer/2D/Behaviors/SteerForPathSimplified2D.cs.meta similarity index 100% rename from 2D/Behaviors/SteerForPathSimplified2D.cs.meta rename to Assets/UnitySteer/2D/Behaviors/SteerForPathSimplified2D.cs.meta diff --git a/2D/Behaviors/SteerForPoint2D.cs b/Assets/UnitySteer/2D/Behaviors/SteerForPoint2D.cs similarity index 100% rename from 2D/Behaviors/SteerForPoint2D.cs rename to Assets/UnitySteer/2D/Behaviors/SteerForPoint2D.cs diff --git a/2D/Behaviors/SteerForPoint2D.cs.meta b/Assets/UnitySteer/2D/Behaviors/SteerForPoint2D.cs.meta similarity index 100% rename from 2D/Behaviors/SteerForPoint2D.cs.meta rename to Assets/UnitySteer/2D/Behaviors/SteerForPoint2D.cs.meta diff --git a/2D/Behaviors/SteerForPursuit2D.cs b/Assets/UnitySteer/2D/Behaviors/SteerForPursuit2D.cs similarity index 100% rename from 2D/Behaviors/SteerForPursuit2D.cs rename to Assets/UnitySteer/2D/Behaviors/SteerForPursuit2D.cs diff --git a/2D/Behaviors/SteerForPursuit2D.cs.meta b/Assets/UnitySteer/2D/Behaviors/SteerForPursuit2D.cs.meta similarity index 100% rename from 2D/Behaviors/SteerForPursuit2D.cs.meta rename to Assets/UnitySteer/2D/Behaviors/SteerForPursuit2D.cs.meta diff --git a/2D/Behaviors/SteerForRigidbodyEvasion2D.cs b/Assets/UnitySteer/2D/Behaviors/SteerForRigidbodyEvasion2D.cs similarity index 100% rename from 2D/Behaviors/SteerForRigidbodyEvasion2D.cs rename to Assets/UnitySteer/2D/Behaviors/SteerForRigidbodyEvasion2D.cs diff --git a/2D/Behaviors/SteerForRigidbodyEvasion2D.cs.meta b/Assets/UnitySteer/2D/Behaviors/SteerForRigidbodyEvasion2D.cs.meta similarity index 100% rename from 2D/Behaviors/SteerForRigidbodyEvasion2D.cs.meta rename to Assets/UnitySteer/2D/Behaviors/SteerForRigidbodyEvasion2D.cs.meta diff --git a/2D/Behaviors/SteerForSeparation2D.cs b/Assets/UnitySteer/2D/Behaviors/SteerForSeparation2D.cs similarity index 100% rename from 2D/Behaviors/SteerForSeparation2D.cs rename to Assets/UnitySteer/2D/Behaviors/SteerForSeparation2D.cs diff --git a/2D/Behaviors/SteerForSeparation2D.cs.meta b/Assets/UnitySteer/2D/Behaviors/SteerForSeparation2D.cs.meta similarity index 100% rename from 2D/Behaviors/SteerForSeparation2D.cs.meta rename to Assets/UnitySteer/2D/Behaviors/SteerForSeparation2D.cs.meta diff --git a/2D/Behaviors/SteerForSpeed2D.cs b/Assets/UnitySteer/2D/Behaviors/SteerForSpeed2D.cs similarity index 100% rename from 2D/Behaviors/SteerForSpeed2D.cs rename to Assets/UnitySteer/2D/Behaviors/SteerForSpeed2D.cs diff --git a/2D/Behaviors/SteerForSpeed2D.cs.meta b/Assets/UnitySteer/2D/Behaviors/SteerForSpeed2D.cs.meta similarity index 100% rename from 2D/Behaviors/SteerForSpeed2D.cs.meta rename to Assets/UnitySteer/2D/Behaviors/SteerForSpeed2D.cs.meta diff --git a/2D/Behaviors/SteerForSpeedFluctuation2D.cs b/Assets/UnitySteer/2D/Behaviors/SteerForSpeedFluctuation2D.cs similarity index 100% rename from 2D/Behaviors/SteerForSpeedFluctuation2D.cs rename to Assets/UnitySteer/2D/Behaviors/SteerForSpeedFluctuation2D.cs diff --git a/2D/Behaviors/SteerForSpeedFluctuation2D.cs.meta b/Assets/UnitySteer/2D/Behaviors/SteerForSpeedFluctuation2D.cs.meta similarity index 100% rename from 2D/Behaviors/SteerForSpeedFluctuation2D.cs.meta rename to Assets/UnitySteer/2D/Behaviors/SteerForSpeedFluctuation2D.cs.meta diff --git a/2D/Behaviors/SteerForSphericalObstacles2D.cs b/Assets/UnitySteer/2D/Behaviors/SteerForSphericalObstacles2D.cs similarity index 98% rename from 2D/Behaviors/SteerForSphericalObstacles2D.cs rename to Assets/UnitySteer/2D/Behaviors/SteerForSphericalObstacles2D.cs index accb177..0278cc8 100644 --- a/2D/Behaviors/SteerForSphericalObstacles2D.cs +++ b/Assets/UnitySteer/2D/Behaviors/SteerForSphericalObstacles2D.cs @@ -109,7 +109,7 @@ protected override Vector2 CalculateForce() * and distance to affect the avoidance - the further away the intersection * is, the less weight they'll carry. */ - Profiler.BeginSample("Accumulate spherical obstacle influences"); + UnityEngine.Profiling.Profiler.BeginSample("Accumulate spherical obstacle influences"); for (var i = 0; i < Vehicle.Radar.Obstacles.Count; i++) { var sphere = Vehicle.Radar.Obstacles[i]; @@ -129,7 +129,7 @@ protected override Vector2 CalculateForce() var oppositeDirection = Vehicle.Position - sphere.Position; avoidance += avoidanceMultiplier * oppositeDirection; } - Profiler.EndSample(); + UnityEngine.Profiling.Profiler.EndSample(); avoidance /= Vehicle.Radar.Obstacles.Count; diff --git a/2D/Behaviors/SteerForSphericalObstacles2D.cs.meta b/Assets/UnitySteer/2D/Behaviors/SteerForSphericalObstacles2D.cs.meta similarity index 100% rename from 2D/Behaviors/SteerForSphericalObstacles2D.cs.meta rename to Assets/UnitySteer/2D/Behaviors/SteerForSphericalObstacles2D.cs.meta diff --git a/2D/Behaviors/SteerForTether2D.cs b/Assets/UnitySteer/2D/Behaviors/SteerForTether2D.cs similarity index 100% rename from 2D/Behaviors/SteerForTether2D.cs rename to Assets/UnitySteer/2D/Behaviors/SteerForTether2D.cs diff --git a/2D/Behaviors/SteerForTether2D.cs.meta b/Assets/UnitySteer/2D/Behaviors/SteerForTether2D.cs.meta similarity index 100% rename from 2D/Behaviors/SteerForTether2D.cs.meta rename to Assets/UnitySteer/2D/Behaviors/SteerForTether2D.cs.meta diff --git a/2D/Behaviors/SteerForWander2D.cs b/Assets/UnitySteer/2D/Behaviors/SteerForWander2D.cs similarity index 100% rename from 2D/Behaviors/SteerForWander2D.cs rename to Assets/UnitySteer/2D/Behaviors/SteerForWander2D.cs diff --git a/2D/Behaviors/SteerForWander2D.cs.meta b/Assets/UnitySteer/2D/Behaviors/SteerForWander2D.cs.meta similarity index 100% rename from 2D/Behaviors/SteerForWander2D.cs.meta rename to Assets/UnitySteer/2D/Behaviors/SteerForWander2D.cs.meta diff --git a/2D/Behaviors/Steering2D.cs b/Assets/UnitySteer/2D/Behaviors/Steering2D.cs similarity index 100% rename from 2D/Behaviors/Steering2D.cs rename to Assets/UnitySteer/2D/Behaviors/Steering2D.cs diff --git a/2D/Behaviors/Steering2D.cs.meta b/Assets/UnitySteer/2D/Behaviors/Steering2D.cs.meta similarity index 100% rename from 2D/Behaviors/Steering2D.cs.meta rename to Assets/UnitySteer/2D/Behaviors/Steering2D.cs.meta diff --git a/2D/Behaviors/TickedVehicle2D.cs b/Assets/UnitySteer/2D/Behaviors/TickedVehicle2D.cs similarity index 96% rename from 2D/Behaviors/TickedVehicle2D.cs rename to Assets/UnitySteer/2D/Behaviors/TickedVehicle2D.cs index 1bb4dad..c8903bd 100644 --- a/2D/Behaviors/TickedVehicle2D.cs +++ b/Assets/UnitySteer/2D/Behaviors/TickedVehicle2D.cs @@ -167,11 +167,11 @@ protected void CalculateForces() { return; } - Profiler.BeginSample("Calculating vehicle forces"); + UnityEngine.Profiling.Profiler.BeginSample("Calculating vehicle forces"); var force = Vector2.zero; - Profiler.BeginSample("Adding up basic steerings"); + UnityEngine.Profiling.Profiler.BeginSample("Adding up basic steerings"); for (var i = 0; i < Steerings.Length; i++) { var s = Steerings[i]; @@ -181,7 +181,7 @@ protected void CalculateForces() force += s.WeighedForce; } } - Profiler.EndSample(); + UnityEngine.Profiling.Profiler.EndSample(); LastRawForce = force; // Enforce speed limit. Steering behaviors are expected to return a @@ -205,7 +205,7 @@ protected void CalculateForces() // but things are working just fine for now, and it seems like // overkill. var adjustedVelocity = Vector2.zero; - Profiler.BeginSample("Adding up post-processing steerings"); + UnityEngine.Profiling.Profiler.BeginSample("Adding up post-processing steerings"); for (var i = 0; i < SteeringPostprocessors.Length; i++) { var s = SteeringPostprocessors[i]; @@ -215,7 +215,7 @@ protected void CalculateForces() adjustedVelocity += s.WeighedForce; } } - Profiler.EndSample(); + UnityEngine.Profiling.Profiler.EndSample(); if (adjustedVelocity != Vector2.zero) @@ -228,7 +228,7 @@ protected void CalculateForces() // Update vehicle velocity SetCalculatedVelocity(newVelocity); - Profiler.EndSample(); + UnityEngine.Profiling.Profiler.EndSample(); } diff --git a/2D/Behaviors/TickedVehicle2D.cs.meta b/Assets/UnitySteer/2D/Behaviors/TickedVehicle2D.cs.meta similarity index 100% rename from 2D/Behaviors/TickedVehicle2D.cs.meta rename to Assets/UnitySteer/2D/Behaviors/TickedVehicle2D.cs.meta diff --git a/2D/Behaviors/Vehicle2D.cs b/Assets/UnitySteer/2D/Behaviors/Vehicle2D.cs similarity index 100% rename from 2D/Behaviors/Vehicle2D.cs rename to Assets/UnitySteer/2D/Behaviors/Vehicle2D.cs diff --git a/2D/Behaviors/Vehicle2D.cs.meta b/Assets/UnitySteer/2D/Behaviors/Vehicle2D.cs.meta similarity index 100% rename from 2D/Behaviors/Vehicle2D.cs.meta rename to Assets/UnitySteer/2D/Behaviors/Vehicle2D.cs.meta diff --git a/2D/IPathway.cs b/Assets/UnitySteer/2D/IPathway.cs similarity index 100% rename from 2D/IPathway.cs rename to Assets/UnitySteer/2D/IPathway.cs diff --git a/2D/IPathway.cs.meta b/Assets/UnitySteer/2D/IPathway.cs.meta similarity index 100% rename from 2D/IPathway.cs.meta rename to Assets/UnitySteer/2D/IPathway.cs.meta diff --git a/2D/OpenSteerUtility.cs b/Assets/UnitySteer/2D/OpenSteerUtility.cs similarity index 100% rename from 2D/OpenSteerUtility.cs rename to Assets/UnitySteer/2D/OpenSteerUtility.cs diff --git a/2D/OpenSteerUtility.cs.meta b/Assets/UnitySteer/2D/OpenSteerUtility.cs.meta similarity index 100% rename from 2D/OpenSteerUtility.cs.meta rename to Assets/UnitySteer/2D/OpenSteerUtility.cs.meta diff --git a/2D/SplinePathway.cs b/Assets/UnitySteer/2D/SplinePathway.cs similarity index 100% rename from 2D/SplinePathway.cs rename to Assets/UnitySteer/2D/SplinePathway.cs diff --git a/2D/SplinePathway.cs.meta b/Assets/UnitySteer/2D/SplinePathway.cs.meta similarity index 100% rename from 2D/SplinePathway.cs.meta rename to Assets/UnitySteer/2D/SplinePathway.cs.meta diff --git a/2D/Tools.meta b/Assets/UnitySteer/2D/Tools.meta similarity index 100% rename from 2D/Tools.meta rename to Assets/UnitySteer/2D/Tools.meta diff --git a/2D/Tools/DetectableObjectCreator2D.cs b/Assets/UnitySteer/2D/Tools/DetectableObjectCreator2D.cs similarity index 100% rename from 2D/Tools/DetectableObjectCreator2D.cs rename to Assets/UnitySteer/2D/Tools/DetectableObjectCreator2D.cs diff --git a/2D/Tools/DetectableObjectCreator2D.cs.meta b/Assets/UnitySteer/2D/Tools/DetectableObjectCreator2D.cs.meta similarity index 100% rename from 2D/Tools/DetectableObjectCreator2D.cs.meta rename to Assets/UnitySteer/2D/Tools/DetectableObjectCreator2D.cs.meta diff --git a/2D/Tools/RandomizeStartPosition2D.cs b/Assets/UnitySteer/2D/Tools/RandomizeStartPosition2D.cs similarity index 100% rename from 2D/Tools/RandomizeStartPosition2D.cs rename to Assets/UnitySteer/2D/Tools/RandomizeStartPosition2D.cs diff --git a/2D/Tools/RandomizeStartPosition2D.cs.meta b/Assets/UnitySteer/2D/Tools/RandomizeStartPosition2D.cs.meta similarity index 100% rename from 2D/Tools/RandomizeStartPosition2D.cs.meta rename to Assets/UnitySteer/2D/Tools/RandomizeStartPosition2D.cs.meta diff --git a/2D/Tools/Speedometer2D.cs b/Assets/UnitySteer/2D/Tools/Speedometer2D.cs similarity index 100% rename from 2D/Tools/Speedometer2D.cs rename to Assets/UnitySteer/2D/Tools/Speedometer2D.cs diff --git a/2D/Tools/Speedometer2D.cs.meta b/Assets/UnitySteer/2D/Tools/Speedometer2D.cs.meta similarity index 100% rename from 2D/Tools/Speedometer2D.cs.meta rename to Assets/UnitySteer/2D/Tools/Speedometer2D.cs.meta diff --git a/2D/Vector2Pathway.cs b/Assets/UnitySteer/2D/Vector2Pathway.cs similarity index 100% rename from 2D/Vector2Pathway.cs rename to Assets/UnitySteer/2D/Vector2Pathway.cs diff --git a/2D/Vector2Pathway.cs.meta b/Assets/UnitySteer/2D/Vector2Pathway.cs.meta similarity index 100% rename from 2D/Vector2Pathway.cs.meta rename to Assets/UnitySteer/2D/Vector2Pathway.cs.meta diff --git a/3D.meta b/Assets/UnitySteer/3D.meta similarity index 100% rename from 3D.meta rename to Assets/UnitySteer/3D.meta diff --git a/3D/Behaviors.meta b/Assets/UnitySteer/3D/Behaviors.meta similarity index 100% rename from 3D/Behaviors.meta rename to Assets/UnitySteer/3D/Behaviors.meta diff --git a/3D/Behaviors/AutonomousVehicle.cs b/Assets/UnitySteer/3D/Behaviors/AutonomousVehicle.cs similarity index 100% rename from 3D/Behaviors/AutonomousVehicle.cs rename to Assets/UnitySteer/3D/Behaviors/AutonomousVehicle.cs diff --git a/3D/Behaviors/AutonomousVehicle.cs.meta b/Assets/UnitySteer/3D/Behaviors/AutonomousVehicle.cs.meta similarity index 100% rename from 3D/Behaviors/AutonomousVehicle.cs.meta rename to Assets/UnitySteer/3D/Behaviors/AutonomousVehicle.cs.meta diff --git a/3D/Behaviors/Biped.cs b/Assets/UnitySteer/3D/Behaviors/Biped.cs similarity index 100% rename from 3D/Behaviors/Biped.cs rename to Assets/UnitySteer/3D/Behaviors/Biped.cs diff --git a/3D/Behaviors/Biped.cs.meta b/Assets/UnitySteer/3D/Behaviors/Biped.cs.meta similarity index 100% rename from 3D/Behaviors/Biped.cs.meta rename to Assets/UnitySteer/3D/Behaviors/Biped.cs.meta diff --git a/3D/Behaviors/DetectableObject.cs b/Assets/UnitySteer/3D/Behaviors/DetectableObject.cs similarity index 100% rename from 3D/Behaviors/DetectableObject.cs rename to Assets/UnitySteer/3D/Behaviors/DetectableObject.cs diff --git a/3D/Behaviors/DetectableObject.cs.meta b/Assets/UnitySteer/3D/Behaviors/DetectableObject.cs.meta similarity index 100% rename from 3D/Behaviors/DetectableObject.cs.meta rename to Assets/UnitySteer/3D/Behaviors/DetectableObject.cs.meta diff --git a/3D/Behaviors/PassiveVehicle.cs b/Assets/UnitySteer/3D/Behaviors/PassiveVehicle.cs similarity index 100% rename from 3D/Behaviors/PassiveVehicle.cs rename to Assets/UnitySteer/3D/Behaviors/PassiveVehicle.cs diff --git a/3D/Behaviors/PassiveVehicle.cs.meta b/Assets/UnitySteer/3D/Behaviors/PassiveVehicle.cs.meta similarity index 100% rename from 3D/Behaviors/PassiveVehicle.cs.meta rename to Assets/UnitySteer/3D/Behaviors/PassiveVehicle.cs.meta diff --git a/3D/Behaviors/Radar.cs b/Assets/UnitySteer/3D/Behaviors/Radar.cs similarity index 93% rename from 3D/Behaviors/Radar.cs rename to Assets/UnitySteer/3D/Behaviors/Radar.cs index 5004d19..5bf1575 100644 --- a/3D/Behaviors/Radar.cs +++ b/Assets/UnitySteer/3D/Behaviors/Radar.cs @@ -206,14 +206,14 @@ private void OnDisable() private void OnUpdateRadar(object obj) { - Profiler.BeginSample("OnUpdateRadar"); + UnityEngine.Profiling.Profiler.BeginSample("OnUpdateRadar"); _detectedColliders = Detect(); FilterDetected(); if (OnDetected != null) { - Profiler.BeginSample("Detection event handler"); + UnityEngine.Profiling.Profiler.BeginSample("Detection event handler"); OnDetected(this); - Profiler.EndSample(); + UnityEngine.Profiling.Profiler.EndSample(); } #if TRACEDETECTED if (DrawGizmos) @@ -237,7 +237,7 @@ private void OnUpdateRadar(object obj) Debug.Log(sb.ToString()); } #endif - Profiler.EndSample(); + UnityEngine.Profiling.Profiler.EndSample(); } public void UpdateRadar() @@ -265,14 +265,14 @@ protected virtual void FilterDetected() * took about 75% of the time used for the frame. * */ - Profiler.BeginSample("Base FilterDetected"); + UnityEngine.Profiling.Profiler.BeginSample("Base FilterDetected"); _vehicles.Clear(); _obstacles.Clear(); _detectedObjects.Clear(); - Profiler.BeginSample("Initial detection"); + UnityEngine.Profiling.Profiler.BeginSample("Initial detection"); for (var i = 0; i < _detectedColliders.Length; i++) { var id = _detectedColliders[i].GetInstanceID(); @@ -289,9 +289,9 @@ protected virtual void FilterDetected() _detectedObjects.Add(detectable); } } - Profiler.EndSample(); + UnityEngine.Profiling.Profiler.EndSample(); - Profiler.BeginSample("Filtering out vehicles"); + UnityEngine.Profiling.Profiler.BeginSample("Filtering out vehicles"); for (var i = 0; i < _detectedObjects.Count; i++) { var d = _detectedObjects[i]; @@ -305,8 +305,8 @@ protected virtual void FilterDetected() _obstacles.Add(d); } } - Profiler.EndSample(); - Profiler.EndSample(); + UnityEngine.Profiling.Profiler.EndSample(); + UnityEngine.Profiling.Profiler.EndSample(); } #endregion diff --git a/3D/Behaviors/Radar.cs.meta b/Assets/UnitySteer/3D/Behaviors/Radar.cs.meta similarity index 100% rename from 3D/Behaviors/Radar.cs.meta rename to Assets/UnitySteer/3D/Behaviors/Radar.cs.meta diff --git a/3D/Behaviors/SteerForAlignment.cs b/Assets/UnitySteer/3D/Behaviors/SteerForAlignment.cs similarity index 100% rename from 3D/Behaviors/SteerForAlignment.cs rename to Assets/UnitySteer/3D/Behaviors/SteerForAlignment.cs diff --git a/3D/Behaviors/SteerForAlignment.cs.meta b/Assets/UnitySteer/3D/Behaviors/SteerForAlignment.cs.meta similarity index 100% rename from 3D/Behaviors/SteerForAlignment.cs.meta rename to Assets/UnitySteer/3D/Behaviors/SteerForAlignment.cs.meta diff --git a/3D/Behaviors/SteerForCharacterEvasion.cs b/Assets/UnitySteer/3D/Behaviors/SteerForCharacterEvasion.cs similarity index 100% rename from 3D/Behaviors/SteerForCharacterEvasion.cs rename to Assets/UnitySteer/3D/Behaviors/SteerForCharacterEvasion.cs diff --git a/3D/Behaviors/SteerForCharacterEvasion.cs.meta b/Assets/UnitySteer/3D/Behaviors/SteerForCharacterEvasion.cs.meta similarity index 100% rename from 3D/Behaviors/SteerForCharacterEvasion.cs.meta rename to Assets/UnitySteer/3D/Behaviors/SteerForCharacterEvasion.cs.meta diff --git a/3D/Behaviors/SteerForCohesion.cs b/Assets/UnitySteer/3D/Behaviors/SteerForCohesion.cs similarity index 100% rename from 3D/Behaviors/SteerForCohesion.cs rename to Assets/UnitySteer/3D/Behaviors/SteerForCohesion.cs diff --git a/3D/Behaviors/SteerForCohesion.cs.meta b/Assets/UnitySteer/3D/Behaviors/SteerForCohesion.cs.meta similarity index 100% rename from 3D/Behaviors/SteerForCohesion.cs.meta rename to Assets/UnitySteer/3D/Behaviors/SteerForCohesion.cs.meta diff --git a/3D/Behaviors/SteerForEvasion.cs b/Assets/UnitySteer/3D/Behaviors/SteerForEvasion.cs similarity index 100% rename from 3D/Behaviors/SteerForEvasion.cs rename to Assets/UnitySteer/3D/Behaviors/SteerForEvasion.cs diff --git a/3D/Behaviors/SteerForEvasion.cs.meta b/Assets/UnitySteer/3D/Behaviors/SteerForEvasion.cs.meta similarity index 100% rename from 3D/Behaviors/SteerForEvasion.cs.meta rename to Assets/UnitySteer/3D/Behaviors/SteerForEvasion.cs.meta diff --git a/3D/Behaviors/SteerForFear.cs b/Assets/UnitySteer/3D/Behaviors/SteerForFear.cs similarity index 96% rename from 3D/Behaviors/SteerForFear.cs rename to Assets/UnitySteer/3D/Behaviors/SteerForFear.cs index da60128..38707f4 100644 --- a/3D/Behaviors/SteerForFear.cs +++ b/Assets/UnitySteer/3D/Behaviors/SteerForFear.cs @@ -65,7 +65,7 @@ protected override void Start() protected override Vector3 CalculateForce() { - Profiler.BeginSample("Accumulating repulsion"); + UnityEngine.Profiling.Profiler.BeginSample("Accumulating repulsion"); var accumulator = Vector3.zero; var totalCount = 0; var now = Time.time; @@ -99,7 +99,7 @@ protected override Vector3 CalculateForce() Debug.DrawLine(position, futurePosition, Color.blue); Debug.DrawLine(position + accumulator, futurePosition, Color.magenta); #endif - Profiler.EndSample(); + UnityEngine.Profiling.Profiler.EndSample(); return accumulator; } diff --git a/3D/Behaviors/SteerForFear.cs.meta b/Assets/UnitySteer/3D/Behaviors/SteerForFear.cs.meta similarity index 100% rename from 3D/Behaviors/SteerForFear.cs.meta rename to Assets/UnitySteer/3D/Behaviors/SteerForFear.cs.meta diff --git a/3D/Behaviors/SteerForForward.cs b/Assets/UnitySteer/3D/Behaviors/SteerForForward.cs similarity index 100% rename from 3D/Behaviors/SteerForForward.cs rename to Assets/UnitySteer/3D/Behaviors/SteerForForward.cs diff --git a/3D/Behaviors/SteerForForward.cs.meta b/Assets/UnitySteer/3D/Behaviors/SteerForForward.cs.meta similarity index 100% rename from 3D/Behaviors/SteerForForward.cs.meta rename to Assets/UnitySteer/3D/Behaviors/SteerForForward.cs.meta diff --git a/3D/Behaviors/SteerForMatchingVelocity.cs b/Assets/UnitySteer/3D/Behaviors/SteerForMatchingVelocity.cs similarity index 100% rename from 3D/Behaviors/SteerForMatchingVelocity.cs rename to Assets/UnitySteer/3D/Behaviors/SteerForMatchingVelocity.cs diff --git a/3D/Behaviors/SteerForMatchingVelocity.cs.meta b/Assets/UnitySteer/3D/Behaviors/SteerForMatchingVelocity.cs.meta similarity index 100% rename from 3D/Behaviors/SteerForMatchingVelocity.cs.meta rename to Assets/UnitySteer/3D/Behaviors/SteerForMatchingVelocity.cs.meta diff --git a/3D/Behaviors/SteerForMinimumSpeed.cs b/Assets/UnitySteer/3D/Behaviors/SteerForMinimumSpeed.cs similarity index 100% rename from 3D/Behaviors/SteerForMinimumSpeed.cs rename to Assets/UnitySteer/3D/Behaviors/SteerForMinimumSpeed.cs diff --git a/3D/Behaviors/SteerForMinimumSpeed.cs.meta b/Assets/UnitySteer/3D/Behaviors/SteerForMinimumSpeed.cs.meta similarity index 100% rename from 3D/Behaviors/SteerForMinimumSpeed.cs.meta rename to Assets/UnitySteer/3D/Behaviors/SteerForMinimumSpeed.cs.meta diff --git a/3D/Behaviors/SteerForNavmesh.cs b/Assets/UnitySteer/3D/Behaviors/SteerForNavmesh.cs similarity index 85% rename from 3D/Behaviors/SteerForNavmesh.cs rename to Assets/UnitySteer/3D/Behaviors/SteerForNavmesh.cs index 8aa3b41..db6b090 100644 --- a/3D/Behaviors/SteerForNavmesh.cs +++ b/Assets/UnitySteer/3D/Behaviors/SteerForNavmesh.cs @@ -94,7 +94,7 @@ protected override void Start() { base.Start(); #if UNITY_5 - _navMeshLayerMask = 1 << NavMesh.GetAreaFromName("Default"); + _navMeshLayerMask = 1 << UnityEngine.AI.NavMesh.GetAreaFromName("Default"); #else _navMeshLayerMask = 1 << NavMesh.GetNavMeshLayerFromName("Default"); #endif @@ -119,7 +119,7 @@ public override bool IsPostProcess /// protected override Vector3 CalculateForce() { - NavMeshHit hit; + UnityEngine.AI.NavMeshHit hit; /* * While we could just calculate line as (Velocity * predictionTime) @@ -137,16 +137,16 @@ protected override Vector3 CalculateForce() { var probePosition = Vehicle.Position + _probePositionOffset; - Profiler.BeginSample("Off-mesh checking"); - NavMesh.SamplePosition(probePosition, out hit, _probeRadius, _navMeshLayerMask); - Profiler.EndSample(); + UnityEngine.Profiling.Profiler.BeginSample("Off-mesh checking"); + UnityEngine.AI.NavMesh.SamplePosition(probePosition, out hit, _probeRadius, _navMeshLayerMask); + UnityEngine.Profiling.Profiler.EndSample(); if (!hit.hit) { // we're not on the navmesh - Profiler.BeginSample("Find closest edge"); - NavMesh.FindClosestEdge(probePosition, out hit, _navMeshLayerMask); - Profiler.EndSample(); + UnityEngine.Profiling.Profiler.BeginSample("Find closest edge"); + UnityEngine.AI.NavMesh.FindClosestEdge(probePosition, out hit, _navMeshLayerMask); + UnityEngine.Profiling.Profiler.EndSample(); if (hit.hit) { @@ -166,14 +166,14 @@ protected override Vector3 CalculateForce() } - Profiler.BeginSample("NavMesh raycast"); - NavMesh.Raycast(Vehicle.Position, futurePosition, out hit, _navMeshLayerMask); - Profiler.EndSample(); + UnityEngine.Profiling.Profiler.BeginSample("NavMesh raycast"); + UnityEngine.AI.NavMesh.Raycast(Vehicle.Position, futurePosition, out hit, _navMeshLayerMask); + UnityEngine.Profiling.Profiler.EndSample(); if (!hit.hit) return Vector3.zero; - Profiler.BeginSample("Calculate NavMesh avoidance"); + UnityEngine.Profiling.Profiler.BeginSample("Calculate NavMesh avoidance"); var moveDirection = Vehicle.Velocity.normalized; var avoidance = OpenSteerUtility.PerpendicularComponent(hit.normal, moveDirection); @@ -189,7 +189,7 @@ protected override Vector3 CalculateForce() Debug.DrawLine(Vehicle.Position, Vehicle.Position + avoidance, Color.yellow); #endif - Profiler.EndSample(); + UnityEngine.Profiling.Profiler.EndSample(); return avoidance; } diff --git a/3D/Behaviors/SteerForNavmesh.cs.meta b/Assets/UnitySteer/3D/Behaviors/SteerForNavmesh.cs.meta similarity index 100% rename from 3D/Behaviors/SteerForNavmesh.cs.meta rename to Assets/UnitySteer/3D/Behaviors/SteerForNavmesh.cs.meta diff --git a/3D/Behaviors/SteerForNeighborGroup.cs b/Assets/UnitySteer/3D/Behaviors/SteerForNeighborGroup.cs similarity index 94% rename from 3D/Behaviors/SteerForNeighborGroup.cs rename to Assets/UnitySteer/3D/Behaviors/SteerForNeighborGroup.cs index 87500a5..163f5e8 100644 --- a/3D/Behaviors/SteerForNeighborGroup.cs +++ b/Assets/UnitySteer/3D/Behaviors/SteerForNeighborGroup.cs @@ -168,7 +168,7 @@ protected override Vector3 CalculateForce() { // steering accumulator and count of neighbors, both initially zero var steering = Vector3.zero; - Profiler.BeginSample("SteerForNeighborGroup.Looping over neighbors"); + UnityEngine.Profiling.Profiler.BeginSample("SteerForNeighborGroup.Looping over neighbors"); // I'd prefer an iterator, but trying to cut down on allocations for (var i = 0; i < _neighbors.Count; i++) { @@ -185,7 +185,7 @@ protected override Vector3 CalculateForce() { Debug.DrawLine(Vehicle.Position, other.Position, Color.magenta); } - Profiler.BeginSample("SteerForNeighborGroup.Adding"); + UnityEngine.Profiling.Profiler.BeginSample("SteerForNeighborGroup.Adding"); for (var bi = 0; bi < _behaviors.Length; bi++) { var behavior = _behaviors[bi]; @@ -194,16 +194,16 @@ protected override Vector3 CalculateForce() steering += behavior.CalculateNeighborContribution(other) * behavior.Weight; } } - Profiler.EndSample(); + UnityEngine.Profiling.Profiler.EndSample(); } } ; - Profiler.EndSample(); + UnityEngine.Profiling.Profiler.EndSample(); - Profiler.BeginSample("Normalizing"); + UnityEngine.Profiling.Profiler.BeginSample("Normalizing"); // Normalize for pure direction steering.Normalize(); - Profiler.EndSample(); + UnityEngine.Profiling.Profiler.EndSample(); return steering; } diff --git a/3D/Behaviors/SteerForNeighborGroup.cs.meta b/Assets/UnitySteer/3D/Behaviors/SteerForNeighborGroup.cs.meta similarity index 100% rename from 3D/Behaviors/SteerForNeighborGroup.cs.meta rename to Assets/UnitySteer/3D/Behaviors/SteerForNeighborGroup.cs.meta diff --git a/3D/Behaviors/SteerForNeighbors.cs b/Assets/UnitySteer/3D/Behaviors/SteerForNeighbors.cs similarity index 100% rename from 3D/Behaviors/SteerForNeighbors.cs rename to Assets/UnitySteer/3D/Behaviors/SteerForNeighbors.cs diff --git a/3D/Behaviors/SteerForNeighbors.cs.meta b/Assets/UnitySteer/3D/Behaviors/SteerForNeighbors.cs.meta similarity index 100% rename from 3D/Behaviors/SteerForNeighbors.cs.meta rename to Assets/UnitySteer/3D/Behaviors/SteerForNeighbors.cs.meta diff --git a/3D/Behaviors/SteerForPathSimplified.cs b/Assets/UnitySteer/3D/Behaviors/SteerForPathSimplified.cs similarity index 100% rename from 3D/Behaviors/SteerForPathSimplified.cs rename to Assets/UnitySteer/3D/Behaviors/SteerForPathSimplified.cs diff --git a/3D/Behaviors/SteerForPathSimplified.cs.meta b/Assets/UnitySteer/3D/Behaviors/SteerForPathSimplified.cs.meta similarity index 100% rename from 3D/Behaviors/SteerForPathSimplified.cs.meta rename to Assets/UnitySteer/3D/Behaviors/SteerForPathSimplified.cs.meta diff --git a/3D/Behaviors/SteerForPoint.cs b/Assets/UnitySteer/3D/Behaviors/SteerForPoint.cs similarity index 100% rename from 3D/Behaviors/SteerForPoint.cs rename to Assets/UnitySteer/3D/Behaviors/SteerForPoint.cs diff --git a/3D/Behaviors/SteerForPoint.cs.meta b/Assets/UnitySteer/3D/Behaviors/SteerForPoint.cs.meta similarity index 100% rename from 3D/Behaviors/SteerForPoint.cs.meta rename to Assets/UnitySteer/3D/Behaviors/SteerForPoint.cs.meta diff --git a/3D/Behaviors/SteerForPursuit.cs b/Assets/UnitySteer/3D/Behaviors/SteerForPursuit.cs similarity index 100% rename from 3D/Behaviors/SteerForPursuit.cs rename to Assets/UnitySteer/3D/Behaviors/SteerForPursuit.cs diff --git a/3D/Behaviors/SteerForPursuit.cs.meta b/Assets/UnitySteer/3D/Behaviors/SteerForPursuit.cs.meta similarity index 100% rename from 3D/Behaviors/SteerForPursuit.cs.meta rename to Assets/UnitySteer/3D/Behaviors/SteerForPursuit.cs.meta diff --git a/3D/Behaviors/SteerForSeparation.cs b/Assets/UnitySteer/3D/Behaviors/SteerForSeparation.cs similarity index 100% rename from 3D/Behaviors/SteerForSeparation.cs rename to Assets/UnitySteer/3D/Behaviors/SteerForSeparation.cs diff --git a/3D/Behaviors/SteerForSeparation.cs.meta b/Assets/UnitySteer/3D/Behaviors/SteerForSeparation.cs.meta similarity index 100% rename from 3D/Behaviors/SteerForSeparation.cs.meta rename to Assets/UnitySteer/3D/Behaviors/SteerForSeparation.cs.meta diff --git a/3D/Behaviors/SteerForSpeed.cs b/Assets/UnitySteer/3D/Behaviors/SteerForSpeed.cs similarity index 100% rename from 3D/Behaviors/SteerForSpeed.cs rename to Assets/UnitySteer/3D/Behaviors/SteerForSpeed.cs diff --git a/3D/Behaviors/SteerForSpeed.cs.meta b/Assets/UnitySteer/3D/Behaviors/SteerForSpeed.cs.meta similarity index 100% rename from 3D/Behaviors/SteerForSpeed.cs.meta rename to Assets/UnitySteer/3D/Behaviors/SteerForSpeed.cs.meta diff --git a/3D/Behaviors/SteerForSpeedFluctuation.cs b/Assets/UnitySteer/3D/Behaviors/SteerForSpeedFluctuation.cs similarity index 100% rename from 3D/Behaviors/SteerForSpeedFluctuation.cs rename to Assets/UnitySteer/3D/Behaviors/SteerForSpeedFluctuation.cs diff --git a/3D/Behaviors/SteerForSpeedFluctuation.cs.meta b/Assets/UnitySteer/3D/Behaviors/SteerForSpeedFluctuation.cs.meta similarity index 100% rename from 3D/Behaviors/SteerForSpeedFluctuation.cs.meta rename to Assets/UnitySteer/3D/Behaviors/SteerForSpeedFluctuation.cs.meta diff --git a/3D/Behaviors/SteerForSphericalObstacles.cs b/Assets/UnitySteer/3D/Behaviors/SteerForSphericalObstacles.cs similarity index 98% rename from 3D/Behaviors/SteerForSphericalObstacles.cs rename to Assets/UnitySteer/3D/Behaviors/SteerForSphericalObstacles.cs index d6c245d..b27e9ae 100644 --- a/3D/Behaviors/SteerForSphericalObstacles.cs +++ b/Assets/UnitySteer/3D/Behaviors/SteerForSphericalObstacles.cs @@ -108,7 +108,7 @@ protected override Vector3 CalculateForce() * and distance to affect the avoidance - the further away the intersection * is, the less weight they'll carry. */ - Profiler.BeginSample("Accumulate spherical obstacle influences"); + UnityEngine.Profiling.Profiler.BeginSample("Accumulate spherical obstacle influences"); for (var i = 0; i < Vehicle.Radar.Obstacles.Count; i++) { var sphere = Vehicle.Radar.Obstacles[i]; @@ -128,7 +128,7 @@ protected override Vector3 CalculateForce() var oppositeDirection = Vehicle.Position - sphere.Position; avoidance += avoidanceMultiplier * oppositeDirection; } - Profiler.EndSample(); + UnityEngine.Profiling.Profiler.EndSample(); avoidance /= Vehicle.Radar.Obstacles.Count; diff --git a/3D/Behaviors/SteerForSphericalObstacles.cs.meta b/Assets/UnitySteer/3D/Behaviors/SteerForSphericalObstacles.cs.meta similarity index 100% rename from 3D/Behaviors/SteerForSphericalObstacles.cs.meta rename to Assets/UnitySteer/3D/Behaviors/SteerForSphericalObstacles.cs.meta diff --git a/3D/Behaviors/SteerForTether.cs b/Assets/UnitySteer/3D/Behaviors/SteerForTether.cs similarity index 100% rename from 3D/Behaviors/SteerForTether.cs rename to Assets/UnitySteer/3D/Behaviors/SteerForTether.cs diff --git a/3D/Behaviors/SteerForTether.cs.meta b/Assets/UnitySteer/3D/Behaviors/SteerForTether.cs.meta similarity index 100% rename from 3D/Behaviors/SteerForTether.cs.meta rename to Assets/UnitySteer/3D/Behaviors/SteerForTether.cs.meta diff --git a/3D/Behaviors/SteerForWander.cs b/Assets/UnitySteer/3D/Behaviors/SteerForWander.cs similarity index 100% rename from 3D/Behaviors/SteerForWander.cs rename to Assets/UnitySteer/3D/Behaviors/SteerForWander.cs diff --git a/3D/Behaviors/SteerForWander.cs.meta b/Assets/UnitySteer/3D/Behaviors/SteerForWander.cs.meta similarity index 100% rename from 3D/Behaviors/SteerForWander.cs.meta rename to Assets/UnitySteer/3D/Behaviors/SteerForWander.cs.meta diff --git a/3D/Behaviors/SteerToFollow.cs b/Assets/UnitySteer/3D/Behaviors/SteerToFollow.cs similarity index 100% rename from 3D/Behaviors/SteerToFollow.cs rename to Assets/UnitySteer/3D/Behaviors/SteerToFollow.cs diff --git a/3D/Behaviors/SteerToFollow.cs.meta b/Assets/UnitySteer/3D/Behaviors/SteerToFollow.cs.meta similarity index 100% rename from 3D/Behaviors/SteerToFollow.cs.meta rename to Assets/UnitySteer/3D/Behaviors/SteerToFollow.cs.meta diff --git a/3D/Behaviors/Steering.cs b/Assets/UnitySteer/3D/Behaviors/Steering.cs similarity index 100% rename from 3D/Behaviors/Steering.cs rename to Assets/UnitySteer/3D/Behaviors/Steering.cs diff --git a/3D/Behaviors/Steering.cs.meta b/Assets/UnitySteer/3D/Behaviors/Steering.cs.meta similarity index 100% rename from 3D/Behaviors/Steering.cs.meta rename to Assets/UnitySteer/3D/Behaviors/Steering.cs.meta diff --git a/3D/Behaviors/TickedVehicle.cs b/Assets/UnitySteer/3D/Behaviors/TickedVehicle.cs similarity index 96% rename from 3D/Behaviors/TickedVehicle.cs rename to Assets/UnitySteer/3D/Behaviors/TickedVehicle.cs index 298265b..c8d930a 100644 --- a/3D/Behaviors/TickedVehicle.cs +++ b/Assets/UnitySteer/3D/Behaviors/TickedVehicle.cs @@ -169,11 +169,11 @@ protected void CalculateForces() { return; } - Profiler.BeginSample("Calculating vehicle forces"); + UnityEngine.Profiling.Profiler.BeginSample("Calculating vehicle forces"); var force = Vector3.zero; - Profiler.BeginSample("Adding up basic steerings"); + UnityEngine.Profiling.Profiler.BeginSample("Adding up basic steerings"); for (var i = 0; i < Steerings.Length; i++) { var s = Steerings[i]; @@ -182,7 +182,7 @@ protected void CalculateForces() force += s.WeighedForce; } } - Profiler.EndSample(); + UnityEngine.Profiling.Profiler.EndSample(); LastRawForce = force; // Enforce speed limit. Steering behaviors are expected to return a @@ -206,7 +206,7 @@ protected void CalculateForces() // but things are working just fine for now, and it seems like // overkill. var adjustedVelocity = Vector3.zero; - Profiler.BeginSample("Adding up post-processing steerings"); + UnityEngine.Profiling.Profiler.BeginSample("Adding up post-processing steerings"); for (var i = 0; i < SteeringPostprocessors.Length; i++) { var s = SteeringPostprocessors[i]; @@ -215,7 +215,7 @@ protected void CalculateForces() adjustedVelocity += s.WeighedForce; } } - Profiler.EndSample(); + UnityEngine.Profiling.Profiler.EndSample(); if (adjustedVelocity != Vector3.zero) @@ -228,7 +228,7 @@ protected void CalculateForces() // Update vehicle velocity SetCalculatedVelocity(newVelocity); - Profiler.EndSample(); + UnityEngine.Profiling.Profiler.EndSample(); } diff --git a/3D/Behaviors/TickedVehicle.cs.meta b/Assets/UnitySteer/3D/Behaviors/TickedVehicle.cs.meta similarity index 100% rename from 3D/Behaviors/TickedVehicle.cs.meta rename to Assets/UnitySteer/3D/Behaviors/TickedVehicle.cs.meta diff --git a/3D/Behaviors/Vehicle.cs b/Assets/UnitySteer/3D/Behaviors/Vehicle.cs similarity index 100% rename from 3D/Behaviors/Vehicle.cs rename to Assets/UnitySteer/3D/Behaviors/Vehicle.cs diff --git a/3D/Behaviors/Vehicle.cs.meta b/Assets/UnitySteer/3D/Behaviors/Vehicle.cs.meta similarity index 100% rename from 3D/Behaviors/Vehicle.cs.meta rename to Assets/UnitySteer/3D/Behaviors/Vehicle.cs.meta diff --git a/3D/IPathway.cs b/Assets/UnitySteer/3D/IPathway.cs similarity index 100% rename from 3D/IPathway.cs rename to Assets/UnitySteer/3D/IPathway.cs diff --git a/3D/IPathway.cs.meta b/Assets/UnitySteer/3D/IPathway.cs.meta similarity index 100% rename from 3D/IPathway.cs.meta rename to Assets/UnitySteer/3D/IPathway.cs.meta diff --git a/3D/OpenSteerUtility.cs b/Assets/UnitySteer/3D/OpenSteerUtility.cs similarity index 100% rename from 3D/OpenSteerUtility.cs rename to Assets/UnitySteer/3D/OpenSteerUtility.cs diff --git a/3D/OpenSteerUtility.cs.meta b/Assets/UnitySteer/3D/OpenSteerUtility.cs.meta similarity index 100% rename from 3D/OpenSteerUtility.cs.meta rename to Assets/UnitySteer/3D/OpenSteerUtility.cs.meta diff --git a/3D/SplinePathway.cs b/Assets/UnitySteer/3D/SplinePathway.cs similarity index 100% rename from 3D/SplinePathway.cs rename to Assets/UnitySteer/3D/SplinePathway.cs diff --git a/3D/SplinePathway.cs.meta b/Assets/UnitySteer/3D/SplinePathway.cs.meta similarity index 100% rename from 3D/SplinePathway.cs.meta rename to Assets/UnitySteer/3D/SplinePathway.cs.meta diff --git a/3D/Tools.meta b/Assets/UnitySteer/3D/Tools.meta similarity index 100% rename from 3D/Tools.meta rename to Assets/UnitySteer/3D/Tools.meta diff --git a/3D/Tools/DetectableObjectCreator.cs b/Assets/UnitySteer/3D/Tools/DetectableObjectCreator.cs similarity index 100% rename from 3D/Tools/DetectableObjectCreator.cs rename to Assets/UnitySteer/3D/Tools/DetectableObjectCreator.cs diff --git a/3D/Tools/DetectableObjectCreator.cs.meta b/Assets/UnitySteer/3D/Tools/DetectableObjectCreator.cs.meta similarity index 100% rename from 3D/Tools/DetectableObjectCreator.cs.meta rename to Assets/UnitySteer/3D/Tools/DetectableObjectCreator.cs.meta diff --git a/3D/Tools/RandomizeStartPosition.cs b/Assets/UnitySteer/3D/Tools/RandomizeStartPosition.cs similarity index 100% rename from 3D/Tools/RandomizeStartPosition.cs rename to Assets/UnitySteer/3D/Tools/RandomizeStartPosition.cs diff --git a/3D/Tools/RandomizeStartPosition.cs.meta b/Assets/UnitySteer/3D/Tools/RandomizeStartPosition.cs.meta similarity index 100% rename from 3D/Tools/RandomizeStartPosition.cs.meta rename to Assets/UnitySteer/3D/Tools/RandomizeStartPosition.cs.meta diff --git a/3D/Tools/Speedometer.cs b/Assets/UnitySteer/3D/Tools/Speedometer.cs similarity index 100% rename from 3D/Tools/Speedometer.cs rename to Assets/UnitySteer/3D/Tools/Speedometer.cs diff --git a/3D/Tools/Speedometer.cs.meta b/Assets/UnitySteer/3D/Tools/Speedometer.cs.meta similarity index 100% rename from 3D/Tools/Speedometer.cs.meta rename to Assets/UnitySteer/3D/Tools/Speedometer.cs.meta diff --git a/3D/Vector3Pathway.cs b/Assets/UnitySteer/3D/Vector3Pathway.cs similarity index 100% rename from 3D/Vector3Pathway.cs rename to Assets/UnitySteer/3D/Vector3Pathway.cs diff --git a/3D/Vector3Pathway.cs.meta b/Assets/UnitySteer/3D/Vector3Pathway.cs.meta similarity index 100% rename from 3D/Vector3Pathway.cs.meta rename to Assets/UnitySteer/3D/Vector3Pathway.cs.meta diff --git a/Attributes.meta b/Assets/UnitySteer/Attributes.meta similarity index 100% rename from Attributes.meta rename to Assets/UnitySteer/Attributes.meta diff --git a/Attributes/AngleCosineAttribute.cs b/Assets/UnitySteer/Attributes/AngleCosineAttribute.cs similarity index 100% rename from Attributes/AngleCosineAttribute.cs rename to Assets/UnitySteer/Attributes/AngleCosineAttribute.cs diff --git a/Attributes/AngleCosineAttribute.cs.meta b/Assets/UnitySteer/Attributes/AngleCosineAttribute.cs.meta similarity index 100% rename from Attributes/AngleCosineAttribute.cs.meta rename to Assets/UnitySteer/Attributes/AngleCosineAttribute.cs.meta diff --git a/Attributes/RangeAttribute.cs b/Assets/UnitySteer/Attributes/RangeAttribute.cs similarity index 100% rename from Attributes/RangeAttribute.cs rename to Assets/UnitySteer/Attributes/RangeAttribute.cs diff --git a/Attributes/RangeAttribute.cs.meta b/Assets/UnitySteer/Attributes/RangeAttribute.cs.meta similarity index 100% rename from Attributes/RangeAttribute.cs.meta rename to Assets/UnitySteer/Attributes/RangeAttribute.cs.meta diff --git a/Attributes/Vector2ToggleAttribute.cs b/Assets/UnitySteer/Attributes/Vector2ToggleAttribute.cs similarity index 100% rename from Attributes/Vector2ToggleAttribute.cs rename to Assets/UnitySteer/Attributes/Vector2ToggleAttribute.cs diff --git a/Attributes/Vector2ToggleAttribute.cs.meta b/Assets/UnitySteer/Attributes/Vector2ToggleAttribute.cs.meta similarity index 100% rename from Attributes/Vector2ToggleAttribute.cs.meta rename to Assets/UnitySteer/Attributes/Vector2ToggleAttribute.cs.meta diff --git a/Attributes/Vector3ToggleAttribute.cs b/Assets/UnitySteer/Attributes/Vector3ToggleAttribute.cs similarity index 100% rename from Attributes/Vector3ToggleAttribute.cs rename to Assets/UnitySteer/Attributes/Vector3ToggleAttribute.cs diff --git a/Attributes/Vector3ToggleAttribute.cs.meta b/Assets/UnitySteer/Attributes/Vector3ToggleAttribute.cs.meta similarity index 100% rename from Attributes/Vector3ToggleAttribute.cs.meta rename to Assets/UnitySteer/Attributes/Vector3ToggleAttribute.cs.meta diff --git a/CHANGELOG.md b/Assets/UnitySteer/CHANGELOG.md similarity index 100% rename from CHANGELOG.md rename to Assets/UnitySteer/CHANGELOG.md diff --git a/CHANGELOG.md.meta b/Assets/UnitySteer/CHANGELOG.md.meta similarity index 100% rename from CHANGELOG.md.meta rename to Assets/UnitySteer/CHANGELOG.md.meta diff --git a/CHANGELOG.v2.md b/Assets/UnitySteer/CHANGELOG.v2.md similarity index 100% rename from CHANGELOG.v2.md rename to Assets/UnitySteer/CHANGELOG.v2.md diff --git a/CHANGELOG.v2.md.meta b/Assets/UnitySteer/CHANGELOG.v2.md.meta similarity index 100% rename from CHANGELOG.v2.md.meta rename to Assets/UnitySteer/CHANGELOG.v2.md.meta diff --git a/Editor.meta b/Assets/UnitySteer/Editor.meta similarity index 100% rename from Editor.meta rename to Assets/UnitySteer/Editor.meta diff --git a/Editor/AngleCosineDrawer.cs b/Assets/UnitySteer/Editor/AngleCosineDrawer.cs similarity index 100% rename from Editor/AngleCosineDrawer.cs rename to Assets/UnitySteer/Editor/AngleCosineDrawer.cs diff --git a/Editor/AngleCosineDrawer.cs.meta b/Assets/UnitySteer/Editor/AngleCosineDrawer.cs.meta similarity index 100% rename from Editor/AngleCosineDrawer.cs.meta rename to Assets/UnitySteer/Editor/AngleCosineDrawer.cs.meta diff --git a/Editor/DegreeEditor.cs b/Assets/UnitySteer/Editor/DegreeEditor.cs similarity index 100% rename from Editor/DegreeEditor.cs rename to Assets/UnitySteer/Editor/DegreeEditor.cs diff --git a/Editor/DegreeEditor.cs.meta b/Assets/UnitySteer/Editor/DegreeEditor.cs.meta similarity index 100% rename from Editor/DegreeEditor.cs.meta rename to Assets/UnitySteer/Editor/DegreeEditor.cs.meta diff --git a/Editor/Vector2TogglePropertyDrawer.cs b/Assets/UnitySteer/Editor/Vector2TogglePropertyDrawer.cs similarity index 100% rename from Editor/Vector2TogglePropertyDrawer.cs rename to Assets/UnitySteer/Editor/Vector2TogglePropertyDrawer.cs diff --git a/Editor/Vector2TogglePropertyDrawer.cs.meta b/Assets/UnitySteer/Editor/Vector2TogglePropertyDrawer.cs.meta similarity index 100% rename from Editor/Vector2TogglePropertyDrawer.cs.meta rename to Assets/UnitySteer/Editor/Vector2TogglePropertyDrawer.cs.meta diff --git a/Editor/Vector3FoldoutEditor.cs b/Assets/UnitySteer/Editor/Vector3FoldoutEditor.cs similarity index 100% rename from Editor/Vector3FoldoutEditor.cs rename to Assets/UnitySteer/Editor/Vector3FoldoutEditor.cs diff --git a/Editor/Vector3FoldoutEditor.cs.meta b/Assets/UnitySteer/Editor/Vector3FoldoutEditor.cs.meta similarity index 100% rename from Editor/Vector3FoldoutEditor.cs.meta rename to Assets/UnitySteer/Editor/Vector3FoldoutEditor.cs.meta diff --git a/Editor/Vector3TogglePropertyDrawer.cs b/Assets/UnitySteer/Editor/Vector3TogglePropertyDrawer.cs similarity index 100% rename from Editor/Vector3TogglePropertyDrawer.cs rename to Assets/UnitySteer/Editor/Vector3TogglePropertyDrawer.cs diff --git a/Editor/Vector3TogglePropertyDrawer.cs.meta b/Assets/UnitySteer/Editor/Vector3TogglePropertyDrawer.cs.meta similarity index 100% rename from Editor/Vector3TogglePropertyDrawer.cs.meta rename to Assets/UnitySteer/Editor/Vector3TogglePropertyDrawer.cs.meta diff --git a/License.txt b/Assets/UnitySteer/License.txt old mode 100755 new mode 100644 similarity index 100% rename from License.txt rename to Assets/UnitySteer/License.txt diff --git a/License.txt.meta b/Assets/UnitySteer/License.txt.meta similarity index 100% rename from License.txt.meta rename to Assets/UnitySteer/License.txt.meta diff --git a/README.md b/Assets/UnitySteer/README.md similarity index 100% rename from README.md rename to Assets/UnitySteer/README.md diff --git a/README.md.meta b/Assets/UnitySteer/README.md.meta similarity index 100% rename from README.md.meta rename to Assets/UnitySteer/README.md.meta diff --git a/TickedPriorityQueue.meta b/Assets/UnitySteer/TickedPriorityQueue.meta similarity index 100% rename from TickedPriorityQueue.meta rename to Assets/UnitySteer/TickedPriorityQueue.meta diff --git a/TickedPriorityQueue/LICENSE.txt b/Assets/UnitySteer/TickedPriorityQueue/LICENSE.txt similarity index 100% rename from TickedPriorityQueue/LICENSE.txt rename to Assets/UnitySteer/TickedPriorityQueue/LICENSE.txt diff --git a/TickedPriorityQueue/LICENSE.txt.meta b/Assets/UnitySteer/TickedPriorityQueue/LICENSE.txt.meta similarity index 100% rename from TickedPriorityQueue/LICENSE.txt.meta rename to Assets/UnitySteer/TickedPriorityQueue/LICENSE.txt.meta diff --git a/TickedPriorityQueue/TickedPriorityQueue.dll b/Assets/UnitySteer/TickedPriorityQueue/TickedPriorityQueue.dll old mode 100755 new mode 100644 similarity index 100% rename from TickedPriorityQueue/TickedPriorityQueue.dll rename to Assets/UnitySteer/TickedPriorityQueue/TickedPriorityQueue.dll diff --git a/TickedPriorityQueue/TickedPriorityQueue.dll.meta b/Assets/UnitySteer/TickedPriorityQueue/TickedPriorityQueue.dll.meta similarity index 100% rename from TickedPriorityQueue/TickedPriorityQueue.dll.meta rename to Assets/UnitySteer/TickedPriorityQueue/TickedPriorityQueue.dll.meta diff --git a/TickedPriorityQueue/UnityTickedQueue.cs b/Assets/UnitySteer/TickedPriorityQueue/UnityTickedQueue.cs similarity index 100% rename from TickedPriorityQueue/UnityTickedQueue.cs rename to Assets/UnitySteer/TickedPriorityQueue/UnityTickedQueue.cs diff --git a/TickedPriorityQueue/UnityTickedQueue.cs.meta b/Assets/UnitySteer/TickedPriorityQueue/UnityTickedQueue.cs.meta similarity index 100% rename from TickedPriorityQueue/UnityTickedQueue.cs.meta rename to Assets/UnitySteer/TickedPriorityQueue/UnityTickedQueue.cs.meta diff --git a/Assets/UnityTestTools.meta b/Assets/UnityTestTools.meta new file mode 100644 index 0000000..324aaf9 --- /dev/null +++ b/Assets/UnityTestTools.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3b196082cc5f76f4ebb520fc85f2374b +folderAsset: yes +timeCreated: 1493983440 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityTestTools/Assertions.meta b/Assets/UnityTestTools/Assertions.meta new file mode 100644 index 0000000..229b8b8 --- /dev/null +++ b/Assets/UnityTestTools/Assertions.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: b27b28700d3365146808b6e082748201 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/Assertions/AssertionComponent.cs b/Assets/UnityTestTools/Assertions/AssertionComponent.cs new file mode 100644 index 0000000..fa40d48 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/AssertionComponent.cs @@ -0,0 +1,379 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using UnityEngine; +using Debug = UnityEngine.Debug; +using Object = UnityEngine.Object; + +namespace UnityTest +{ + [Serializable] + public class AssertionComponent : MonoBehaviour, IAssertionComponentConfigurator + { + [SerializeField] public float checkAfterTime = 1f; + [SerializeField] public bool repeatCheckTime = true; + [SerializeField] public float repeatEveryTime = 1f; + [SerializeField] public int checkAfterFrames = 1; + [SerializeField] public bool repeatCheckFrame = true; + [SerializeField] public int repeatEveryFrame = 1; + [SerializeField] public bool hasFailed; + + [SerializeField] public CheckMethod checkMethods = CheckMethod.Start; + [SerializeField] private ActionBase m_ActionBase; + + [SerializeField] public int checksPerformed = 0; + + private int m_CheckOnFrame; + + private string m_CreatedInFilePath = ""; + private int m_CreatedInFileLine = -1; + + public ActionBase Action + { + get { return m_ActionBase; } + set + { + m_ActionBase = value; + m_ActionBase.go = gameObject; + } + } + + public Object GetFailureReferenceObject() + { + #if UNITY_EDITOR + if (!string.IsNullOrEmpty(m_CreatedInFilePath)) + { + return UnityEditor.AssetDatabase.LoadAssetAtPath(m_CreatedInFilePath, typeof(Object)); + } + #endif + return this; + } + + public string GetCreationLocation() + { + if (!string.IsNullOrEmpty(m_CreatedInFilePath)) + { + var idx = m_CreatedInFilePath.LastIndexOf("\\") + 1; + return string.Format("{0}, line {1} ({2})", m_CreatedInFilePath.Substring(idx), m_CreatedInFileLine, m_CreatedInFilePath); + } + return ""; + } + + public void Awake() + { + if (!Debug.isDebugBuild) + Destroy(this); + OnComponentCopy(); + } + + public void OnValidate() + { + if (Application.isEditor) + OnComponentCopy(); + } + + private void OnComponentCopy() + { + if (m_ActionBase == null) return; + var oldActionList = Resources.FindObjectsOfTypeAll(typeof(AssertionComponent)).Where(o => ((AssertionComponent)o).m_ActionBase == m_ActionBase && o != this); + + // if it's not a copy but a new component don't do anything + if (!oldActionList.Any()) return; + if (oldActionList.Count() > 1) + Debug.LogWarning("More than one refence to comparer found. This shouldn't happen"); + + var oldAction = oldActionList.First() as AssertionComponent; + m_ActionBase = oldAction.m_ActionBase.CreateCopy(oldAction.gameObject, gameObject); + } + + public void Start() + { + CheckAssertionFor(CheckMethod.Start); + + if (IsCheckMethodSelected(CheckMethod.AfterPeriodOfTime)) + { + StartCoroutine("CheckPeriodically"); + } + if (IsCheckMethodSelected(CheckMethod.Update)) + { + m_CheckOnFrame = Time.frameCount + checkAfterFrames; + } + } + + public IEnumerator CheckPeriodically() + { + yield return new WaitForSeconds(checkAfterTime); + CheckAssertionFor(CheckMethod.AfterPeriodOfTime); + while (repeatCheckTime) + { + yield return new WaitForSeconds(repeatEveryTime); + CheckAssertionFor(CheckMethod.AfterPeriodOfTime); + } + } + + public bool ShouldCheckOnFrame() + { + if (Time.frameCount > m_CheckOnFrame) + { + if (repeatCheckFrame) + m_CheckOnFrame += repeatEveryFrame; + else + m_CheckOnFrame = Int32.MaxValue; + return true; + } + return false; + } + + public void OnDisable() + { + CheckAssertionFor(CheckMethod.OnDisable); + } + + public void OnEnable() + { + CheckAssertionFor(CheckMethod.OnEnable); + } + + public void OnDestroy() + { + CheckAssertionFor(CheckMethod.OnDestroy); + } + + public void Update() + { + if (IsCheckMethodSelected(CheckMethod.Update) && ShouldCheckOnFrame()) + { + CheckAssertionFor(CheckMethod.Update); + } + } + + public void FixedUpdate() + { + CheckAssertionFor(CheckMethod.FixedUpdate); + } + + public void LateUpdate() + { + CheckAssertionFor(CheckMethod.LateUpdate); + } + + public void OnControllerColliderHit() + { + CheckAssertionFor(CheckMethod.OnControllerColliderHit); + } + + public void OnParticleCollision() + { + CheckAssertionFor(CheckMethod.OnParticleCollision); + } + + public void OnJointBreak() + { + CheckAssertionFor(CheckMethod.OnJointBreak); + } + + public void OnBecameInvisible() + { + CheckAssertionFor(CheckMethod.OnBecameInvisible); + } + + public void OnBecameVisible() + { + CheckAssertionFor(CheckMethod.OnBecameVisible); + } + + public void OnTriggerEnter() + { + CheckAssertionFor(CheckMethod.OnTriggerEnter); + } + + public void OnTriggerExit() + { + CheckAssertionFor(CheckMethod.OnTriggerExit); + } + + public void OnTriggerStay() + { + CheckAssertionFor(CheckMethod.OnTriggerStay); + } + + public void OnCollisionEnter() + { + CheckAssertionFor(CheckMethod.OnCollisionEnter); + } + + public void OnCollisionExit() + { + CheckAssertionFor(CheckMethod.OnCollisionExit); + } + + public void OnCollisionStay() + { + CheckAssertionFor(CheckMethod.OnCollisionStay); + } + + public void OnTriggerEnter2D() + { + CheckAssertionFor(CheckMethod.OnTriggerEnter2D); + } + + public void OnTriggerExit2D() + { + CheckAssertionFor(CheckMethod.OnTriggerExit2D); + } + + public void OnTriggerStay2D() + { + CheckAssertionFor(CheckMethod.OnTriggerStay2D); + } + + public void OnCollisionEnter2D() + { + CheckAssertionFor(CheckMethod.OnCollisionEnter2D); + } + + public void OnCollisionExit2D() + { + CheckAssertionFor(CheckMethod.OnCollisionExit2D); + } + + public void OnCollisionStay2D() + { + CheckAssertionFor(CheckMethod.OnCollisionStay2D); + } + + private void CheckAssertionFor(CheckMethod checkMethod) + { + if (IsCheckMethodSelected(checkMethod)) + { + Assertions.CheckAssertions(this); + } + } + + public bool IsCheckMethodSelected(CheckMethod method) + { + return method == (checkMethods & method); + } + + + #region Assertion Component create methods + + public static T Create(CheckMethod checkOnMethods, GameObject gameObject, string propertyPath) where T : ActionBase + { + IAssertionComponentConfigurator configurator; + return Create(out configurator, checkOnMethods, gameObject, propertyPath); + } + + public static T Create(out IAssertionComponentConfigurator configurator, CheckMethod checkOnMethods, GameObject gameObject, string propertyPath) where T : ActionBase + { + return CreateAssertionComponent(out configurator, checkOnMethods, gameObject, propertyPath); + } + + public static T Create(CheckMethod checkOnMethods, GameObject gameObject, string propertyPath, GameObject gameObject2, string propertyPath2) where T : ComparerBase + { + IAssertionComponentConfigurator configurator; + return Create(out configurator, checkOnMethods, gameObject, propertyPath, gameObject2, propertyPath2); + } + + public static T Create(out IAssertionComponentConfigurator configurator, CheckMethod checkOnMethods, GameObject gameObject, string propertyPath, GameObject gameObject2, string propertyPath2) where T : ComparerBase + { + var comparer = CreateAssertionComponent(out configurator, checkOnMethods, gameObject, propertyPath); + comparer.compareToType = ComparerBase.CompareToType.CompareToObject; + comparer.other = gameObject2; + comparer.otherPropertyPath = propertyPath2; + return comparer; + } + + public static T Create(CheckMethod checkOnMethods, GameObject gameObject, string propertyPath, object constValue) where T : ComparerBase + { + IAssertionComponentConfigurator configurator; + return Create(out configurator, checkOnMethods, gameObject, propertyPath, constValue); + } + + public static T Create(out IAssertionComponentConfigurator configurator, CheckMethod checkOnMethods, GameObject gameObject, string propertyPath, object constValue) where T : ComparerBase + { + var comparer = CreateAssertionComponent(out configurator, checkOnMethods, gameObject, propertyPath); + if (constValue == null) + { + comparer.compareToType = ComparerBase.CompareToType.CompareToNull; + return comparer; + } + comparer.compareToType = ComparerBase.CompareToType.CompareToConstantValue; + comparer.ConstValue = constValue; + return comparer; + } + + private static T CreateAssertionComponent(out IAssertionComponentConfigurator configurator, CheckMethod checkOnMethods, GameObject gameObject, string propertyPath) where T : ActionBase + { + var ac = gameObject.AddComponent(); + ac.checkMethods = checkOnMethods; + var comparer = ScriptableObject.CreateInstance(); + ac.Action = comparer; + ac.Action.go = gameObject; + ac.Action.thisPropertyPath = propertyPath; + configurator = ac; + +#if !UNITY_METRO + var stackTrace = new StackTrace(true); + var thisFileName = stackTrace.GetFrame(0).GetFileName(); + for (int i = 1; i < stackTrace.FrameCount; i++) + { + var stackFrame = stackTrace.GetFrame(i); + if (stackFrame.GetFileName() != thisFileName) + { + string filePath = stackFrame.GetFileName().Substring(Application.dataPath.Length - "Assets".Length); + ac.m_CreatedInFilePath = filePath; + ac.m_CreatedInFileLine = stackFrame.GetFileLineNumber(); + break; + } + } +#endif // if !UNITY_METRO + return comparer; + } + + #endregion + + #region AssertionComponentConfigurator + public int UpdateCheckStartOnFrame { set { checkAfterFrames = value; } } + public int UpdateCheckRepeatFrequency { set { repeatEveryFrame = value; } } + public bool UpdateCheckRepeat { set { repeatCheckFrame = value; } } + public float TimeCheckStartAfter { set { checkAfterTime = value; } } + public float TimeCheckRepeatFrequency { set { repeatEveryTime = value; } } + public bool TimeCheckRepeat { set { repeatCheckTime = value; } } + public AssertionComponent Component { get { return this; } } + #endregion + } + + public interface IAssertionComponentConfigurator + { + /// + /// If the assertion is evaluated in Update, after how many frame should the evaluation start. Deafult is 1 (first frame) + /// + int UpdateCheckStartOnFrame { set; } + /// + /// If the assertion is evaluated in Update and UpdateCheckRepeat is true, how many frame should pass between evaluations + /// + int UpdateCheckRepeatFrequency { set; } + /// + /// If the assertion is evaluated in Update, should the evaluation be repeated after UpdateCheckRepeatFrequency frames + /// + bool UpdateCheckRepeat { set; } + + /// + /// If the assertion is evaluated after a period of time, after how many seconds the first evaluation should be done + /// + float TimeCheckStartAfter { set; } + /// + /// If the assertion is evaluated after a period of time and TimeCheckRepeat is true, after how many seconds should the next evaluation happen + /// + float TimeCheckRepeatFrequency { set; } + /// + /// If the assertion is evaluated after a period, should the evaluation happen again after TimeCheckRepeatFrequency seconds + /// + bool TimeCheckRepeat { set; } + + AssertionComponent Component { get; } + } +} diff --git a/Assets/UnityTestTools/Assertions/AssertionComponent.cs.meta b/Assets/UnityTestTools/Assertions/AssertionComponent.cs.meta new file mode 100644 index 0000000..26f9ab4 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/AssertionComponent.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8bafa54482a87ac4cbd7ff1bfd1ac93a +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Assertions/AssertionException.cs b/Assets/UnityTestTools/Assertions/AssertionException.cs new file mode 100644 index 0000000..00c6d58 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/AssertionException.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace UnityTest +{ + public class AssertionException : Exception + { + private readonly AssertionComponent m_Assertion; + + public AssertionException(AssertionComponent assertion) : base(assertion.Action.GetFailureMessage()) + { + m_Assertion = assertion; + } + + public override string StackTrace + { + get + { + return "Created in " + m_Assertion.GetCreationLocation(); + } + } + } +} diff --git a/Assets/UnityTestTools/Assertions/AssertionException.cs.meta b/Assets/UnityTestTools/Assertions/AssertionException.cs.meta new file mode 100644 index 0000000..9605bf0 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/AssertionException.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ef3769ab00d50bc4fbb05a9a91c741d9 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Assertions/Assertions.cs b/Assets/UnityTestTools/Assertions/Assertions.cs new file mode 100644 index 0000000..14b3fd6 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Assertions.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using Object = UnityEngine.Object; + +namespace UnityTest +{ + public static class Assertions + { + public static void CheckAssertions() + { + var assertions = Object.FindObjectsOfType(typeof(AssertionComponent)) as AssertionComponent[]; + CheckAssertions(assertions); + } + + public static void CheckAssertions(AssertionComponent assertion) + { + CheckAssertions(new[] {assertion}); + } + + public static void CheckAssertions(GameObject gameObject) + { + CheckAssertions(gameObject.GetComponents()); + } + + public static void CheckAssertions(AssertionComponent[] assertions) + { + if (!Debug.isDebugBuild) + return; + foreach (var assertion in assertions) + { + assertion.checksPerformed++; + var result = assertion.Action.Compare(); + if (!result) + { + assertion.hasFailed = true; + assertion.Action.Fail(assertion); + } + } + } + } +} diff --git a/Assets/UnityTestTools/Assertions/Assertions.cs.meta b/Assets/UnityTestTools/Assertions/Assertions.cs.meta new file mode 100644 index 0000000..00878a4 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Assertions.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 85280dad1e618c143bd3fb07a197b469 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Assertions/CheckMethod.cs b/Assets/UnityTestTools/Assertions/CheckMethod.cs new file mode 100644 index 0000000..07583dd --- /dev/null +++ b/Assets/UnityTestTools/Assertions/CheckMethod.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace UnityTest +{ + [Flags] + public enum CheckMethod + { + AfterPeriodOfTime = 1 << 0, + Start = 1 << 1, + Update = 1 << 2, + FixedUpdate = 1 << 3, + LateUpdate = 1 << 4, + OnDestroy = 1 << 5, + OnEnable = 1 << 6, + OnDisable = 1 << 7, + OnControllerColliderHit = 1 << 8, + OnParticleCollision = 1 << 9, + OnJointBreak = 1 << 10, + OnBecameInvisible = 1 << 11, + OnBecameVisible = 1 << 12, + OnTriggerEnter = 1 << 13, + OnTriggerExit = 1 << 14, + OnTriggerStay = 1 << 15, + OnCollisionEnter = 1 << 16, + OnCollisionExit = 1 << 17, + OnCollisionStay = 1 << 18, + OnTriggerEnter2D = 1 << 19, + OnTriggerExit2D = 1 << 20, + OnTriggerStay2D = 1 << 21, + OnCollisionEnter2D = 1 << 22, + OnCollisionExit2D = 1 << 23, + OnCollisionStay2D = 1 << 24, + } +} diff --git a/Assets/UnityTestTools/Assertions/CheckMethod.cs.meta b/Assets/UnityTestTools/Assertions/CheckMethod.cs.meta new file mode 100644 index 0000000..d3f6ec9 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/CheckMethod.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cbb75d1643c5a55439f8861a827f411b +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Assertions/Comparers.meta b/Assets/UnityTestTools/Assertions/Comparers.meta new file mode 100644 index 0000000..15d3a92 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Comparers.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: bb9e10c25f478c84f826ea85b03ec179 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/Assertions/Comparers/ActionBase.cs b/Assets/UnityTestTools/Assertions/Comparers/ActionBase.cs new file mode 100644 index 0000000..a73e0e2 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Comparers/ActionBase.cs @@ -0,0 +1,121 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using UnityEngine; + +namespace UnityTest +{ + public abstract class ActionBase : ScriptableObject + { + public GameObject go; + protected object m_ObjVal; + + private MemberResolver m_MemberResolver; + + public string thisPropertyPath = ""; + public virtual Type[] GetAccepatbleTypesForA() + { + return null; + } + public virtual int GetDepthOfSearch() { return 2; } + + public virtual string[] GetExcludedFieldNames() + { + return new string[] { }; + } + + public bool Compare() + { + if (m_MemberResolver == null) + m_MemberResolver = new MemberResolver(go, thisPropertyPath); + m_ObjVal = m_MemberResolver.GetValue(UseCache); + var result = Compare(m_ObjVal); + return result; + } + + protected abstract bool Compare(object objVal); + + virtual protected bool UseCache { get { return false; } } + + public virtual Type GetParameterType() { return typeof(object); } + + public virtual string GetConfigurationDescription() + { + string result = ""; +#if !UNITY_METRO + foreach (var prop in GetType().GetFields(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly) + .Where(info => info.FieldType.IsSerializable)) + { + var value = prop.GetValue(this); + if (value is double) + value = ((double)value).ToString("0.########"); + if (value is float) + value = ((float)value).ToString("0.########"); + result += value + " "; + } +#endif // if !UNITY_METRO + return result; + } + + IEnumerable GetFields(Type type) + { +#if !UNITY_METRO + return type.GetFields(BindingFlags.Public | BindingFlags.Instance); +#else + return null; +#endif + } + + public ActionBase CreateCopy(GameObject oldGameObject, GameObject newGameObject) + { +#if !UNITY_METRO + var newObj = CreateInstance(GetType()) as ActionBase; +#else + var newObj = (ActionBase) this.MemberwiseClone(); +#endif + var fields = GetFields(GetType()); + foreach (var field in fields) + { + var value = field.GetValue(this); + if (value is GameObject) + { + if (value as GameObject == oldGameObject) + value = newGameObject; + } + field.SetValue(newObj, value); + } + return newObj; + } + + public virtual void Fail(AssertionComponent assertion) + { + Debug.LogException(new AssertionException(assertion), assertion.GetFailureReferenceObject()); + } + + public virtual string GetFailureMessage() + { + return GetType().Name + " assertion failed.\n(" + go + ")." + thisPropertyPath + " failed. Value: " + m_ObjVal; + } + } + + public abstract class ActionBaseGeneric : ActionBase + { + protected override bool Compare(object objVal) + { + return Compare((T)objVal); + } + protected abstract bool Compare(T objVal); + + public override Type[] GetAccepatbleTypesForA() + { + return new[] { typeof(T) }; + } + + public override Type GetParameterType() + { + return typeof(T); + } + protected override bool UseCache { get { return true; } } + } +} diff --git a/Assets/UnityTestTools/Assertions/Comparers/ActionBase.cs.meta b/Assets/UnityTestTools/Assertions/Comparers/ActionBase.cs.meta new file mode 100644 index 0000000..6d4c3ab --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Comparers/ActionBase.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b4995756bd539804e8143ff1e730f806 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Assertions/Comparers/BoolComparer.cs b/Assets/UnityTestTools/Assertions/Comparers/BoolComparer.cs new file mode 100644 index 0000000..3987cc2 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Comparers/BoolComparer.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace UnityTest +{ + public class BoolComparer : ComparerBaseGeneric + { + protected override bool Compare(bool a, bool b) + { + return a == b; + } + } +} diff --git a/Assets/UnityTestTools/Assertions/Comparers/BoolComparer.cs.meta b/Assets/UnityTestTools/Assertions/Comparers/BoolComparer.cs.meta new file mode 100644 index 0000000..7ee21b6 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Comparers/BoolComparer.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2586c8e41f35d2f4fadde53020bf4207 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Assertions/Comparers/ColliderComparer.cs b/Assets/UnityTestTools/Assertions/Comparers/ColliderComparer.cs new file mode 100644 index 0000000..cfca05d --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Comparers/ColliderComparer.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace UnityTest +{ + public class ColliderComparer : ComparerBaseGeneric + { + public enum CompareType + { + Intersects, + DoesNotIntersect + }; + + public CompareType compareType; + + protected override bool Compare(Bounds a, Bounds b) + { + switch (compareType) + { + case CompareType.Intersects: + return a.Intersects(b); + case CompareType.DoesNotIntersect: + return !a.Intersects(b); + } + throw new Exception(); + } + } +} diff --git a/Assets/UnityTestTools/Assertions/Comparers/ColliderComparer.cs.meta b/Assets/UnityTestTools/Assertions/Comparers/ColliderComparer.cs.meta new file mode 100644 index 0000000..ab3aa47 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Comparers/ColliderComparer.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4eff45b2ac4067b469d7994298341db6 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Assertions/Comparers/ComparerBase.cs b/Assets/UnityTestTools/Assertions/Comparers/ComparerBase.cs new file mode 100644 index 0000000..db90211 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Comparers/ComparerBase.cs @@ -0,0 +1,145 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using Object = System.Object; + +namespace UnityTest +{ + public abstract class ComparerBase : ActionBase + { + public enum CompareToType + { + CompareToObject, + CompareToConstantValue, + CompareToNull + } + + public CompareToType compareToType = CompareToType.CompareToObject; + + public GameObject other; + protected object m_ObjOtherVal; + public string otherPropertyPath = ""; + private MemberResolver m_MemberResolverB; + + protected abstract bool Compare(object a, object b); + + protected override bool Compare(object objValue) + { + if (compareToType == CompareToType.CompareToConstantValue) + { + m_ObjOtherVal = ConstValue; + } + else if (compareToType == CompareToType.CompareToNull) + { + m_ObjOtherVal = null; + } + else + { + if (other == null) + m_ObjOtherVal = null; + else + { + if (m_MemberResolverB == null) + m_MemberResolverB = new MemberResolver(other, otherPropertyPath); + m_ObjOtherVal = m_MemberResolverB.GetValue(UseCache); + } + } + return Compare(objValue, m_ObjOtherVal); + } + + public virtual Type[] GetAccepatbleTypesForB() + { + return null; + } + + #region Const value + + public virtual object ConstValue { get; set; } + public virtual object GetDefaultConstValue() + { + throw new NotImplementedException(); + } + + #endregion + + public override string GetFailureMessage() + { + var message = GetType().Name + " assertion failed.\n" + go.name + "." + thisPropertyPath + " " + compareToType; + switch (compareToType) + { + case CompareToType.CompareToObject: + message += " (" + other + ")." + otherPropertyPath + " failed."; + break; + case CompareToType.CompareToConstantValue: + message += " " + ConstValue + " failed."; + break; + case CompareToType.CompareToNull: + message += " failed."; + break; + } + message += " Expected: " + m_ObjOtherVal + " Actual: " + m_ObjVal; + return message; + } + } + + [Serializable] + public abstract class ComparerBaseGeneric : ComparerBaseGeneric + { + } + + [Serializable] + public abstract class ComparerBaseGeneric : ComparerBase + { + public T2 constantValueGeneric = default(T2); + + public override Object ConstValue + { + get + { + return constantValueGeneric; + } + set + { + constantValueGeneric = (T2)value; + } + } + + public override Object GetDefaultConstValue() + { + return default(T2); + } + + static bool IsValueType(Type type) + { +#if !UNITY_METRO + return type.IsValueType; +#else + return false; +#endif + } + + protected override bool Compare(object a, object b) + { + var type = typeof(T2); + if (b == null && IsValueType(type)) + { + throw new ArgumentException("Null was passed to a value-type argument"); + } + return Compare((T1)a, (T2)b); + } + + protected abstract bool Compare(T1 a, T2 b); + + public override Type[] GetAccepatbleTypesForA() + { + return new[] { typeof(T1) }; + } + + public override Type[] GetAccepatbleTypesForB() + { + return new[] {typeof(T2)}; + } + + protected override bool UseCache { get { return true; } } + } +} diff --git a/Assets/UnityTestTools/Assertions/Comparers/ComparerBase.cs.meta b/Assets/UnityTestTools/Assertions/Comparers/ComparerBase.cs.meta new file mode 100644 index 0000000..65909eb --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Comparers/ComparerBase.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c86508f389d643b40b6e1d7dcc1d4df2 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Assertions/Comparers/FloatComparer.cs b/Assets/UnityTestTools/Assertions/Comparers/FloatComparer.cs new file mode 100644 index 0000000..ce0a2c2 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Comparers/FloatComparer.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace UnityTest +{ + public class FloatComparer : ComparerBaseGeneric + { + public enum CompareTypes + { + Equal, + NotEqual, + Greater, + Less + } + + public CompareTypes compareTypes; + public double floatingPointError = 0.0001f; + + protected override bool Compare(float a, float b) + { + switch (compareTypes) + { + case CompareTypes.Equal: + return Math.Abs(a - b) < floatingPointError; + case CompareTypes.NotEqual: + return Math.Abs(a - b) > floatingPointError; + case CompareTypes.Greater: + return a > b; + case CompareTypes.Less: + return a < b; + } + throw new Exception(); + } + public override int GetDepthOfSearch() + { + return 3; + } + } +} diff --git a/Assets/UnityTestTools/Assertions/Comparers/FloatComparer.cs.meta b/Assets/UnityTestTools/Assertions/Comparers/FloatComparer.cs.meta new file mode 100644 index 0000000..07353ad --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Comparers/FloatComparer.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a4928c6c2b973874c8d4e6c9a69bb5b4 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Assertions/Comparers/GeneralComparer.cs b/Assets/UnityTestTools/Assertions/Comparers/GeneralComparer.cs new file mode 100644 index 0000000..96892aa --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Comparers/GeneralComparer.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace UnityTest +{ + public class GeneralComparer : ComparerBase + { + public enum CompareType { AEqualsB, ANotEqualsB } + + public CompareType compareType; + + protected override bool Compare(object a, object b) + { + if (compareType == CompareType.AEqualsB) + return a.Equals(b); + if (compareType == CompareType.ANotEqualsB) + return !a.Equals(b); + throw new Exception(); + } + } +} diff --git a/Assets/UnityTestTools/Assertions/Comparers/GeneralComparer.cs.meta b/Assets/UnityTestTools/Assertions/Comparers/GeneralComparer.cs.meta new file mode 100644 index 0000000..6b7edb3 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Comparers/GeneralComparer.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 902961c69f102f4409c29b9e54258701 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Assertions/Comparers/IntComparer.cs b/Assets/UnityTestTools/Assertions/Comparers/IntComparer.cs new file mode 100644 index 0000000..25c43aa --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Comparers/IntComparer.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace UnityTest +{ + public class IntComparer : ComparerBaseGeneric + { + public enum CompareType + { + Equal, + NotEqual, + Greater, + GreaterOrEqual, + Less, + LessOrEqual + }; + + public CompareType compareType; + + protected override bool Compare(int a, int b) + { + switch (compareType) + { + case CompareType.Equal: + return a == b; + case CompareType.NotEqual: + return a != b; + case CompareType.Greater: + return a > b; + case CompareType.GreaterOrEqual: + return a >= b; + case CompareType.Less: + return a < b; + case CompareType.LessOrEqual: + return a <= b; + } + throw new Exception(); + } + } +} diff --git a/Assets/UnityTestTools/Assertions/Comparers/IntComparer.cs.meta b/Assets/UnityTestTools/Assertions/Comparers/IntComparer.cs.meta new file mode 100644 index 0000000..64f4fc3 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Comparers/IntComparer.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: da4a3a521c5c1494aae123742ca5c8f5 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Assertions/Comparers/IsRenderedByCamera.cs b/Assets/UnityTestTools/Assertions/Comparers/IsRenderedByCamera.cs new file mode 100644 index 0000000..bc5d370 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Comparers/IsRenderedByCamera.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace UnityTest +{ + public class IsRenderedByCamera : ComparerBaseGeneric + { + public enum CompareType + { + IsVisible, + IsNotVisible, + }; + + public CompareType compareType; + + protected override bool Compare(Renderer renderer, Camera camera) + { + var planes = GeometryUtility.CalculateFrustumPlanes(camera); + var isVisible = GeometryUtility.TestPlanesAABB(planes, renderer.bounds); + switch (compareType) + { + case CompareType.IsVisible: + return isVisible; + case CompareType.IsNotVisible: + return !isVisible; + } + throw new Exception(); + } + } +} diff --git a/Assets/UnityTestTools/Assertions/Comparers/IsRenderedByCamera.cs.meta b/Assets/UnityTestTools/Assertions/Comparers/IsRenderedByCamera.cs.meta new file mode 100644 index 0000000..9cfc1f2 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Comparers/IsRenderedByCamera.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8d45a1674f5e2e04485eafef922fac41 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Assertions/Comparers/StringComparer.cs b/Assets/UnityTestTools/Assertions/Comparers/StringComparer.cs new file mode 100644 index 0000000..398f3e9 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Comparers/StringComparer.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace UnityTest +{ + public class StringComparer : ComparerBaseGeneric + { + public enum CompareType + { + Equal, + NotEqual, + Shorter, + Longer + } + + public CompareType compareType; + public StringComparison comparisonType = StringComparison.Ordinal; + public bool ignoreCase = false; + + protected override bool Compare(string a, string b) + { + if (ignoreCase) + { + a = a.ToLower(); + b = b.ToLower(); + } + switch (compareType) + { + case CompareType.Equal: + return String.Compare(a, b, comparisonType) == 0; + case CompareType.NotEqual: + return String.Compare(a, b, comparisonType) != 0; + case CompareType.Longer: + return String.Compare(a, b, comparisonType) > 0; + case CompareType.Shorter: + return String.Compare(a, b, comparisonType) < 0; + } + throw new Exception(); + } + } +} diff --git a/Assets/UnityTestTools/Assertions/Comparers/StringComparer.cs.meta b/Assets/UnityTestTools/Assertions/Comparers/StringComparer.cs.meta new file mode 100644 index 0000000..a414f61 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Comparers/StringComparer.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 58783f051e477fd4e93b42ec7a43bb64 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Assertions/Comparers/TransformComparer.cs b/Assets/UnityTestTools/Assertions/Comparers/TransformComparer.cs new file mode 100644 index 0000000..5221c03 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Comparers/TransformComparer.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace UnityTest +{ + public class TransformComparer : ComparerBaseGeneric + { + public enum CompareType { Equals, NotEquals } + + public CompareType compareType; + + protected override bool Compare(Transform a, Transform b) + { + if (compareType == CompareType.Equals) + { + return a.position == b.position; + } + if (compareType == CompareType.NotEquals) + { + return a.position != b.position; + } + throw new Exception(); + } + } +} diff --git a/Assets/UnityTestTools/Assertions/Comparers/TransformComparer.cs.meta b/Assets/UnityTestTools/Assertions/Comparers/TransformComparer.cs.meta new file mode 100644 index 0000000..f3d72e4 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Comparers/TransformComparer.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 927f2d7e4f63632448b2a63d480e601a +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Assertions/Comparers/ValueDoesNotChange.cs b/Assets/UnityTestTools/Assertions/Comparers/ValueDoesNotChange.cs new file mode 100644 index 0000000..49a3cc7 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Comparers/ValueDoesNotChange.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace UnityTest +{ + public class ValueDoesNotChange : ActionBase + { + private object m_Value; + + protected override bool Compare(object a) + { + if (m_Value == null) + m_Value = a; + if (!m_Value.Equals(a)) + return false; + return true; + } + } +} diff --git a/Assets/UnityTestTools/Assertions/Comparers/ValueDoesNotChange.cs.meta b/Assets/UnityTestTools/Assertions/Comparers/ValueDoesNotChange.cs.meta new file mode 100644 index 0000000..b913d35 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Comparers/ValueDoesNotChange.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9d6d16a58a17940419a1dcbff3c60ca5 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Assertions/Comparers/Vector2Comparer.cs b/Assets/UnityTestTools/Assertions/Comparers/Vector2Comparer.cs new file mode 100644 index 0000000..345d76d --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Comparers/Vector2Comparer.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace UnityTest +{ + public class Vector2Comparer : VectorComparerBase + { + public enum CompareType + { + MagnitudeEquals, + MagnitudeNotEquals + } + + public CompareType compareType; + public float floatingPointError = 0.0001f; + + protected override bool Compare(Vector2 a, Vector2 b) + { + switch (compareType) + { + case CompareType.MagnitudeEquals: + return AreVectorMagnitudeEqual(a.magnitude, + b.magnitude, floatingPointError); + case CompareType.MagnitudeNotEquals: + return !AreVectorMagnitudeEqual(a.magnitude, + b.magnitude, floatingPointError); + } + throw new Exception(); + } + public override int GetDepthOfSearch() + { + return 3; + } + } +} diff --git a/Assets/UnityTestTools/Assertions/Comparers/Vector2Comparer.cs.meta b/Assets/UnityTestTools/Assertions/Comparers/Vector2Comparer.cs.meta new file mode 100644 index 0000000..19ef5d2 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Comparers/Vector2Comparer.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a713db190443e814f8254a5a59014ec4 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Assertions/Comparers/Vector3Comparer.cs b/Assets/UnityTestTools/Assertions/Comparers/Vector3Comparer.cs new file mode 100644 index 0000000..56f0b5b --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Comparers/Vector3Comparer.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace UnityTest +{ + public class Vector3Comparer : VectorComparerBase + { + public enum CompareType + { + MagnitudeEquals, + MagnitudeNotEquals + } + + public CompareType compareType; + public double floatingPointError = 0.0001f; + + protected override bool Compare(Vector3 a, Vector3 b) + { + switch (compareType) + { + case CompareType.MagnitudeEquals: + return AreVectorMagnitudeEqual(a.magnitude, + b.magnitude, floatingPointError); + case CompareType.MagnitudeNotEquals: + return !AreVectorMagnitudeEqual(a.magnitude, + b.magnitude, floatingPointError); + } + throw new Exception(); + } + } +} diff --git a/Assets/UnityTestTools/Assertions/Comparers/Vector3Comparer.cs.meta b/Assets/UnityTestTools/Assertions/Comparers/Vector3Comparer.cs.meta new file mode 100644 index 0000000..b871f24 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Comparers/Vector3Comparer.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6febd2d5046657040b3da98b7010ee29 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Assertions/Comparers/Vector4Comparer.cs b/Assets/UnityTestTools/Assertions/Comparers/Vector4Comparer.cs new file mode 100644 index 0000000..4eda043 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Comparers/Vector4Comparer.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace UnityTest +{ + public class Vector4Comparer : VectorComparerBase + { + public enum CompareType + { + MagnitudeEquals, + MagnitudeNotEquals + } + + public CompareType compareType; + public double floatingPointError; + + protected override bool Compare(Vector4 a, Vector4 b) + { + switch (compareType) + { + case CompareType.MagnitudeEquals: + return AreVectorMagnitudeEqual(a.magnitude, + b.magnitude, + floatingPointError); + case CompareType.MagnitudeNotEquals: + return !AreVectorMagnitudeEqual(a.magnitude, + b.magnitude, + floatingPointError); + } + throw new Exception(); + } + public override int GetDepthOfSearch() + { + return 3; + } + } +} diff --git a/Assets/UnityTestTools/Assertions/Comparers/Vector4Comparer.cs.meta b/Assets/UnityTestTools/Assertions/Comparers/Vector4Comparer.cs.meta new file mode 100644 index 0000000..1e0314f --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Comparers/Vector4Comparer.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 383a85a79f164d04b8a56b0ff4e04cb7 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Assertions/Comparers/VectorComparerBase.cs b/Assets/UnityTestTools/Assertions/Comparers/VectorComparerBase.cs new file mode 100644 index 0000000..cb394df --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Comparers/VectorComparerBase.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace UnityTest +{ + public abstract class VectorComparerBase : ComparerBaseGeneric + { + protected bool AreVectorMagnitudeEqual(float a, float b, double floatingPointError) + { + if (Math.Abs(a) < floatingPointError && Math.Abs(b) < floatingPointError) + return true; + if (Math.Abs(a - b) < floatingPointError) + return true; + return false; + } + } +} diff --git a/Assets/UnityTestTools/Assertions/Comparers/VectorComparerBase.cs.meta b/Assets/UnityTestTools/Assertions/Comparers/VectorComparerBase.cs.meta new file mode 100644 index 0000000..d4da9f7 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Comparers/VectorComparerBase.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7b35a237804d5eb42bd8c4e67568ae24 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Assertions/Editor.meta b/Assets/UnityTestTools/Assertions/Editor.meta new file mode 100644 index 0000000..2fa5238 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Editor.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: a28bb39b4fb20514990895d9cb4eaea9 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/Assertions/Editor/AssertionComponentEditor.cs b/Assets/UnityTestTools/Assertions/Editor/AssertionComponentEditor.cs new file mode 100644 index 0000000..5f64b76 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Editor/AssertionComponentEditor.cs @@ -0,0 +1,226 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using UnityEditor; +using UnityEngine; +using UnityEditor.SceneManagement; + +namespace UnityTest +{ + [CustomEditor(typeof(AssertionComponent))] + public class AssertionComponentEditor : Editor + { + private readonly DropDownControl m_ComparerDropDown = new DropDownControl(); + + private readonly PropertyPathSelector m_ThisPathSelector = new PropertyPathSelector("Compare"); + private readonly PropertyPathSelector m_OtherPathSelector = new PropertyPathSelector("Compare to"); + + #region GUI Contents + private readonly GUIContent m_GUICheckAfterTimeGuiContent = new GUIContent("Check after (seconds)", "After how many seconds the assertion should be checked"); + private readonly GUIContent m_GUIRepeatCheckTimeGuiContent = new GUIContent("Repeat check", "Should the check be repeated."); + private readonly GUIContent m_GUIRepeatEveryTimeGuiContent = new GUIContent("Frequency of repetitions", "How often should the check be done"); + private readonly GUIContent m_GUICheckAfterFramesGuiContent = new GUIContent("Check after (frames)", "After how many frames the assertion should be checked"); + private readonly GUIContent m_GUIRepeatCheckFrameGuiContent = new GUIContent("Repeat check", "Should the check be repeated."); + #endregion + + private static List allComparersList = null; + + public AssertionComponentEditor() + { + m_ComparerDropDown.convertForButtonLabel = type => type.Name; + m_ComparerDropDown.convertForGUIContent = type => type.Name; + m_ComparerDropDown.ignoreConvertForGUIContent = types => false; + m_ComparerDropDown.tooltip = "Comparer that will be used to compare values and determine the result of assertion."; + } + + public override void OnInspectorGUI() + { + var script = (AssertionComponent)target; + EditorGUILayout.BeginHorizontal(); + var obj = DrawComparerSelection(script); + script.checkMethods = (CheckMethod)EditorGUILayout.EnumMaskField(script.checkMethods, + EditorStyles.popup, + GUILayout.ExpandWidth(false)); + EditorGUILayout.EndHorizontal(); + + if (script.IsCheckMethodSelected(CheckMethod.AfterPeriodOfTime)) + { + DrawOptionsForAfterPeriodOfTime(script); + } + + if (script.IsCheckMethodSelected(CheckMethod.Update)) + { + DrawOptionsForOnUpdate(script); + } + + if (obj) + { + EditorGUILayout.Space(); + + m_ThisPathSelector.Draw(script.Action.go, script.Action, + script.Action.thisPropertyPath, script.Action.GetAccepatbleTypesForA(), + go => + { + script.Action.go = go; + AssertionExplorerWindow.Reload(); + }, + s => + { + script.Action.thisPropertyPath = s; + AssertionExplorerWindow.Reload(); + }); + + EditorGUILayout.Space(); + + DrawCustomFields(script); + + EditorGUILayout.Space(); + + if (script.Action is ComparerBase) + { + DrawCompareToType(script.Action as ComparerBase); + } + } + if(GUI.changed) + EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene()); + } + + private void DrawOptionsForAfterPeriodOfTime(AssertionComponent script) + { + EditorGUILayout.Space(); + script.checkAfterTime = EditorGUILayout.FloatField(m_GUICheckAfterTimeGuiContent, + script.checkAfterTime); + if (script.checkAfterTime < 0) + script.checkAfterTime = 0; + script.repeatCheckTime = EditorGUILayout.Toggle(m_GUIRepeatCheckTimeGuiContent, + script.repeatCheckTime); + if (script.repeatCheckTime) + { + script.repeatEveryTime = EditorGUILayout.FloatField(m_GUIRepeatEveryTimeGuiContent, + script.repeatEveryTime); + if (script.repeatEveryTime < 0) + script.repeatEveryTime = 0; + } + } + + private void DrawOptionsForOnUpdate(AssertionComponent script) + { + EditorGUILayout.Space(); + script.checkAfterFrames = EditorGUILayout.IntField(m_GUICheckAfterFramesGuiContent, + script.checkAfterFrames); + if (script.checkAfterFrames < 1) + script.checkAfterFrames = 1; + script.repeatCheckFrame = EditorGUILayout.Toggle(m_GUIRepeatCheckFrameGuiContent, + script.repeatCheckFrame); + if (script.repeatCheckFrame) + { + script.repeatEveryFrame = EditorGUILayout.IntField(m_GUIRepeatEveryTimeGuiContent, + script.repeatEveryFrame); + if (script.repeatEveryFrame < 1) + script.repeatEveryFrame = 1; + } + } + + private void DrawCompareToType(ComparerBase comparer) + { + comparer.compareToType = (ComparerBase.CompareToType)EditorGUILayout.EnumPopup("Compare to type", + comparer.compareToType, + EditorStyles.popup); + + if (comparer.compareToType == ComparerBase.CompareToType.CompareToConstantValue) + { + try + { + DrawConstCompareField(comparer); + } + catch (NotImplementedException) + { + Debug.LogWarning("This comparer can't compare to static value"); + comparer.compareToType = ComparerBase.CompareToType.CompareToObject; + } + } + else if (comparer.compareToType == ComparerBase.CompareToType.CompareToObject) + { + DrawObjectCompareField(comparer); + } + } + + private void DrawObjectCompareField(ComparerBase comparer) + { + m_OtherPathSelector.Draw(comparer.other, comparer, + comparer.otherPropertyPath, comparer.GetAccepatbleTypesForB(), + go => + { + comparer.other = go; + AssertionExplorerWindow.Reload(); + }, + s => + { + comparer.otherPropertyPath = s; + AssertionExplorerWindow.Reload(); + } + ); + } + + private void DrawConstCompareField(ComparerBase comparer) + { + if (comparer.ConstValue == null) + { + comparer.ConstValue = comparer.GetDefaultConstValue(); + } + + var so = new SerializedObject(comparer); + var sp = so.FindProperty("constantValueGeneric"); + if (sp != null) + { + EditorGUILayout.PropertyField(sp, new GUIContent("Constant"), true); + so.ApplyModifiedProperties(); + } + } + + private bool DrawComparerSelection(AssertionComponent script) + { + if(allComparersList == null) + { + allComparersList = new List(); + var allAssemblies = AppDomain.CurrentDomain.GetAssemblies(); + foreach (var assembly in allAssemblies) + { + var types = assembly.GetTypes(); + allComparersList.AddRange(types.Where(type => type.IsSubclassOf(typeof(ActionBase)) && !type.IsAbstract)); + } + } + var allComparers = allComparersList.ToArray(); + + if (script.Action == null) + script.Action = (ActionBase)CreateInstance(allComparers.First()); + + m_ComparerDropDown.Draw(script.Action.GetType(), allComparers, + type => + { + if (script.Action == null || script.Action.GetType().Name != type.Name) + { + script.Action = (ActionBase)CreateInstance(type); + AssertionExplorerWindow.Reload(); + } + }); + + return script.Action != null; + } + + private void DrawCustomFields(AssertionComponent script) + { + foreach (var prop in script.Action.GetType().GetFields(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly)) + { + var so = new SerializedObject(script.Action); + var sp = so.FindProperty(prop.Name); + if (sp != null) + { + EditorGUILayout.PropertyField(sp, true); + so.ApplyModifiedProperties(); + } + } + } + } +} diff --git a/Assets/UnityTestTools/Assertions/Editor/AssertionComponentEditor.cs.meta b/Assets/UnityTestTools/Assertions/Editor/AssertionComponentEditor.cs.meta new file mode 100644 index 0000000..eb4174d --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Editor/AssertionComponentEditor.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fd1cabf2c45d0a8489635607a6048621 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Assertions/Editor/AssertionExplorerWindow.cs b/Assets/UnityTestTools/Assertions/Editor/AssertionExplorerWindow.cs new file mode 100644 index 0000000..ecd7fda --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Editor/AssertionExplorerWindow.cs @@ -0,0 +1,194 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine; + +#if UNITY_METRO +#warning Assertion component is not supported on Windows Store apps +#endif + +namespace UnityTest +{ + [Serializable] + public class AssertionExplorerWindow : EditorWindow + { + private List m_AllAssertions = new List(); + [SerializeField] + private string m_FilterText = ""; + [SerializeField] + private FilterType m_FilterType; + [SerializeField] + private List m_FoldMarkers = new List(); + [SerializeField] + private GroupByType m_GroupBy; + [SerializeField] + private Vector2 m_ScrollPosition = Vector2.zero; + private DateTime m_NextReload = DateTime.Now; + [SerializeField] + private static bool s_ShouldReload; + [SerializeField] + private ShowType m_ShowType; + + public AssertionExplorerWindow() + { + titleContent = new GUIContent("Assertion Explorer"); + } + + public void OnDidOpenScene() + { + ReloadAssertionList(); + } + + public void OnFocus() + { + ReloadAssertionList(); + } + + private void ReloadAssertionList() + { + m_NextReload = DateTime.Now.AddSeconds(1); + s_ShouldReload = true; + } + + public void OnHierarchyChange() + { + ReloadAssertionList(); + } + + public void OnInspectorUpdate() + { + if (s_ShouldReload && m_NextReload < DateTime.Now) + { + s_ShouldReload = false; + m_AllAssertions = new List((AssertionComponent[])Resources.FindObjectsOfTypeAll(typeof(AssertionComponent))); + Repaint(); + } + } + + public void OnGUI() + { + DrawMenuPanel(); + + m_ScrollPosition = EditorGUILayout.BeginScrollView(m_ScrollPosition); + if (m_AllAssertions != null) + GetResultRendere().Render(FilterResults(m_AllAssertions, m_FilterText.ToLower()), m_FoldMarkers); + EditorGUILayout.EndScrollView(); + } + + private IEnumerable FilterResults(List assertionComponents, string text) + { + if (m_ShowType == ShowType.ShowDisabled) + assertionComponents = assertionComponents.Where(c => !c.enabled).ToList(); + else if (m_ShowType == ShowType.ShowEnabled) + assertionComponents = assertionComponents.Where(c => c.enabled).ToList(); + + if (string.IsNullOrEmpty(text)) + return assertionComponents; + + switch (m_FilterType) + { + case FilterType.ComparerName: + return assertionComponents.Where(c => c.Action.GetType().Name.ToLower().Contains(text)); + case FilterType.AttachedGameObject: + return assertionComponents.Where(c => c.gameObject.name.ToLower().Contains(text)); + case FilterType.FirstComparedGameObjectPath: + return assertionComponents.Where(c => c.Action.thisPropertyPath.ToLower().Contains(text)); + case FilterType.FirstComparedGameObject: + return assertionComponents.Where(c => c.Action.go != null + && c.Action.go.name.ToLower().Contains(text)); + case FilterType.SecondComparedGameObjectPath: + return assertionComponents.Where(c => + c.Action is ComparerBase + && (c.Action as ComparerBase).otherPropertyPath.ToLower().Contains(text)); + case FilterType.SecondComparedGameObject: + return assertionComponents.Where(c => + c.Action is ComparerBase + && (c.Action as ComparerBase).other != null + && (c.Action as ComparerBase).other.name.ToLower().Contains(text)); + default: + return assertionComponents; + } + } + + private readonly IListRenderer m_GroupByComparerRenderer = new GroupByComparerRenderer(); + private readonly IListRenderer m_GroupByExecutionMethodRenderer = new GroupByExecutionMethodRenderer(); + private readonly IListRenderer m_GroupByGoRenderer = new GroupByGoRenderer(); + private readonly IListRenderer m_GroupByTestsRenderer = new GroupByTestsRenderer(); + private readonly IListRenderer m_GroupByNothingRenderer = new GroupByNothingRenderer(); + + private IListRenderer GetResultRendere() + { + switch (m_GroupBy) + { + case GroupByType.Comparer: + return m_GroupByComparerRenderer; + case GroupByType.ExecutionMethod: + return m_GroupByExecutionMethodRenderer; + case GroupByType.GameObjects: + return m_GroupByGoRenderer; + case GroupByType.Tests: + return m_GroupByTestsRenderer; + default: + return m_GroupByNothingRenderer; + } + } + + private void DrawMenuPanel() + { + EditorGUILayout.BeginHorizontal(EditorStyles.toolbar); + EditorGUILayout.LabelField("Group by:", Styles.toolbarLabel, GUILayout.MaxWidth(60)); + m_GroupBy = (GroupByType)EditorGUILayout.EnumPopup(m_GroupBy, EditorStyles.toolbarPopup, GUILayout.MaxWidth(150)); + + GUILayout.FlexibleSpace(); + + m_ShowType = (ShowType)EditorGUILayout.EnumPopup(m_ShowType, EditorStyles.toolbarPopup, GUILayout.MaxWidth(100)); + + EditorGUILayout.LabelField("Filter by:", Styles.toolbarLabel, GUILayout.MaxWidth(50)); + m_FilterType = (FilterType)EditorGUILayout.EnumPopup(m_FilterType, EditorStyles.toolbarPopup, GUILayout.MaxWidth(100)); + m_FilterText = GUILayout.TextField(m_FilterText, "ToolbarSeachTextField", GUILayout.MaxWidth(100)); + if (GUILayout.Button(GUIContent.none, string.IsNullOrEmpty(m_FilterText) ? "ToolbarSeachCancelButtonEmpty" : "ToolbarSeachCancelButton", GUILayout.ExpandWidth(false))) + m_FilterText = ""; + EditorGUILayout.EndHorizontal(); + } + + [MenuItem("Unity Test Tools/Assertion Explorer")] + public static AssertionExplorerWindow ShowWindow() + { + var w = GetWindow(typeof(AssertionExplorerWindow)); + w.Show(); + return w as AssertionExplorerWindow; + } + + private enum FilterType + { + ComparerName, + FirstComparedGameObject, + FirstComparedGameObjectPath, + SecondComparedGameObject, + SecondComparedGameObjectPath, + AttachedGameObject + } + + private enum ShowType + { + ShowAll, + ShowEnabled, + ShowDisabled + } + + private enum GroupByType + { + Nothing, + Comparer, + GameObjects, + ExecutionMethod, + Tests + } + + public static void Reload() + { + s_ShouldReload = true; + } + } +} diff --git a/Assets/UnityTestTools/Assertions/Editor/AssertionExplorerWindow.cs.meta b/Assets/UnityTestTools/Assertions/Editor/AssertionExplorerWindow.cs.meta new file mode 100644 index 0000000..f5591ab --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Editor/AssertionExplorerWindow.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1a1e855053e7e2f46ace1dc93f2036f2 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Assertions/Editor/AssertionListRenderer.cs b/Assets/UnityTestTools/Assertions/Editor/AssertionListRenderer.cs new file mode 100644 index 0000000..31e1b1e --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Editor/AssertionListRenderer.cs @@ -0,0 +1,251 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine; + +namespace UnityTest +{ + public interface IListRenderer + { + void Render(IEnumerable allAssertions, List foldMarkers); + } + + public abstract class AssertionListRenderer : IListRenderer + { + private static class Styles + { + public static readonly GUIStyle redLabel; + static Styles() + { + redLabel = new GUIStyle(EditorStyles.label); + redLabel.normal.textColor = Color.red; + } + } + + public void Render(IEnumerable allAssertions, List foldMarkers) + { + foreach (var grouping in GroupResult(allAssertions)) + { + var key = GetStringKey(grouping.Key); + bool isFolded = foldMarkers.Contains(key); + if (key != "") + { + EditorGUILayout.BeginHorizontal(); + + EditorGUI.BeginChangeCheck(); + isFolded = PrintFoldout(isFolded, + grouping.Key); + if (EditorGUI.EndChangeCheck()) + { + if (isFolded) + foldMarkers.Add(key); + else + foldMarkers.Remove(key); + } + EditorGUILayout.EndHorizontal(); + if (isFolded) + continue; + } + foreach (var assertionComponent in grouping) + { + EditorGUILayout.BeginVertical(); + EditorGUILayout.BeginHorizontal(); + + if (key != "") + GUILayout.Space(15); + + var assertionKey = assertionComponent.GetHashCode().ToString(); + bool isDetailsFolded = foldMarkers.Contains(assertionKey); + + EditorGUI.BeginChangeCheck(); + if (GUILayout.Button("", + EditorStyles.foldout, + GUILayout.Width(15))) + { + isDetailsFolded = !isDetailsFolded; + } + if (EditorGUI.EndChangeCheck()) + { + if (isDetailsFolded) + foldMarkers.Add(assertionKey); + else + foldMarkers.Remove(assertionKey); + } + PrintFoldedAssertionLine(assertionComponent); + EditorGUILayout.EndHorizontal(); + + if (isDetailsFolded) + { + EditorGUILayout.BeginHorizontal(); + if (key != "") + GUILayout.Space(15); + PrintAssertionLineDetails(assertionComponent); + EditorGUILayout.EndHorizontal(); + } + GUILayout.Box("", new[] {GUILayout.ExpandWidth(true), GUILayout.Height(1)}); + + EditorGUILayout.EndVertical(); + } + } + } + + protected abstract IEnumerable> GroupResult(IEnumerable assertionComponents); + + protected virtual string GetStringKey(T key) + { + return key.GetHashCode().ToString(); + } + + protected virtual bool PrintFoldout(bool isFolded, T key) + { + var content = new GUIContent(GetFoldoutDisplayName(key)); + var size = EditorStyles.foldout.CalcSize(content); + + var rect = GUILayoutUtility.GetRect(content, + EditorStyles.foldout, + GUILayout.MaxWidth(size.x)); + var res = EditorGUI.Foldout(rect, + !isFolded, + content, + true); + + return !res; + } + + protected virtual string GetFoldoutDisplayName(T key) + { + return key.ToString(); + } + + protected virtual void PrintFoldedAssertionLine(AssertionComponent assertionComponent) + { + EditorGUILayout.BeginHorizontal(); + + EditorGUILayout.BeginVertical(GUILayout.MaxWidth(300)); + EditorGUILayout.BeginHorizontal(GUILayout.MaxWidth(300)); + PrintPath(assertionComponent.Action.go, + assertionComponent.Action.thisPropertyPath); + EditorGUILayout.EndHorizontal(); + EditorGUILayout.EndVertical(); + + EditorGUILayout.BeginVertical(GUILayout.MaxWidth(250)); + var labelStr = assertionComponent.Action.GetType().Name; + var labelStr2 = assertionComponent.Action.GetConfigurationDescription(); + if (labelStr2 != "") + labelStr += "( " + labelStr2 + ")"; + EditorGUILayout.LabelField(labelStr); + EditorGUILayout.EndVertical(); + + if (assertionComponent.Action is ComparerBase) + { + var comparer = assertionComponent.Action as ComparerBase; + + var otherStrVal = "(no value selected)"; + EditorGUILayout.BeginVertical(); + EditorGUILayout.BeginHorizontal(GUILayout.MaxWidth(300)); + switch (comparer.compareToType) + { + case ComparerBase.CompareToType.CompareToObject: + if (comparer.other != null) + { + PrintPath(comparer.other, + comparer.otherPropertyPath); + } + else + { + EditorGUILayout.LabelField(otherStrVal, + Styles.redLabel); + } + break; + case ComparerBase.CompareToType.CompareToConstantValue: + otherStrVal = comparer.ConstValue.ToString(); + EditorGUILayout.LabelField(otherStrVal); + break; + case ComparerBase.CompareToType.CompareToNull: + otherStrVal = "null"; + EditorGUILayout.LabelField(otherStrVal); + break; + } + EditorGUILayout.EndHorizontal(); + EditorGUILayout.EndVertical(); + } + else + { + EditorGUILayout.LabelField(""); + } + EditorGUILayout.EndHorizontal(); + EditorGUILayout.Space(); + } + + protected virtual void PrintAssertionLineDetails(AssertionComponent assertionComponent) + { + EditorGUILayout.BeginHorizontal(); + + + EditorGUILayout.BeginVertical(GUILayout.MaxWidth(320)); + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField("Attached to", + GUILayout.Width(70)); + var sss = EditorStyles.objectField.CalcSize(new GUIContent(assertionComponent.gameObject.name)); + EditorGUILayout.ObjectField(assertionComponent.gameObject, + typeof(GameObject), + true, + GUILayout.Width(sss.x)); + EditorGUILayout.EndHorizontal(); + EditorGUILayout.EndVertical(); + + + EditorGUILayout.BeginVertical(GUILayout.MaxWidth(250)); + EditorGUILayout.EnumMaskField(assertionComponent.checkMethods, + EditorStyles.popup, + GUILayout.MaxWidth(150)); + EditorGUILayout.EndVertical(); + + + EditorGUILayout.BeginVertical(); + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField("Disabled", + GUILayout.Width(55)); + assertionComponent.enabled = !EditorGUILayout.Toggle(!assertionComponent.enabled, + GUILayout.Width(15)); + EditorGUILayout.EndHorizontal(); + EditorGUILayout.EndVertical(); + + EditorGUILayout.EndHorizontal(); + } + + private void PrintPath(GameObject go, string propertyPath) + { + string contentString = ""; + GUIStyle styleThisPath = EditorStyles.label; + if (go != null) + { + var sss = EditorStyles.objectField.CalcSize(new GUIContent(go.name)); + EditorGUILayout.ObjectField( + go, + typeof(GameObject), + true, + GUILayout.Width(sss.x)); + + if (!string.IsNullOrEmpty(propertyPath)) + contentString = "." + propertyPath; + } + else + { + contentString = "(no value selected)"; + styleThisPath = Styles.redLabel; + } + + var content = new GUIContent(contentString, + contentString); + var rect = GUILayoutUtility.GetRect(content, + EditorStyles.label, + GUILayout.MaxWidth(200)); + + EditorGUI.LabelField(rect, + content, + styleThisPath); + } + } +} diff --git a/Assets/UnityTestTools/Assertions/Editor/AssertionListRenderer.cs.meta b/Assets/UnityTestTools/Assertions/Editor/AssertionListRenderer.cs.meta new file mode 100644 index 0000000..8e6a0d4 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Editor/AssertionListRenderer.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d83c02fb0f220344da42a8213ed36cb5 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Assertions/Editor/AssertionStripper.cs b/Assets/UnityTestTools/Assertions/Editor/AssertionStripper.cs new file mode 100644 index 0000000..1b6bd04 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Editor/AssertionStripper.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using UnityEditor.Callbacks; +using UnityEngine; +using UnityTest; +using Object = UnityEngine.Object; + +public class AssertionStripper +{ + [PostProcessScene] + public static void OnPostprocessScene() + { + if (Debug.isDebugBuild) return; + RemoveAssertionsFromGameObjects(); + } + + private static void RemoveAssertionsFromGameObjects() + { + var allAssertions = Resources.FindObjectsOfTypeAll(typeof(AssertionComponent)) as AssertionComponent[]; + foreach (var assertion in allAssertions) + { + Object.DestroyImmediate(assertion); + } + } +} diff --git a/Assets/UnityTestTools/Assertions/Editor/AssertionStripper.cs.meta b/Assets/UnityTestTools/Assertions/Editor/AssertionStripper.cs.meta new file mode 100644 index 0000000..bf18bbe --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Editor/AssertionStripper.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 95c9cd9570a6fba4198b6e4f15e11e5e +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Assertions/Editor/DropDownControl.cs b/Assets/UnityTestTools/Assertions/Editor/DropDownControl.cs new file mode 100644 index 0000000..79804f9 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Editor/DropDownControl.cs @@ -0,0 +1,78 @@ +using System; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + +namespace UnityTest +{ + [Serializable] + internal class DropDownControl + { + private readonly GUILayoutOption[] m_ButtonLayoutOptions = { GUILayout.ExpandWidth(true) }; + public Func convertForButtonLabel = s => s.ToString(); + public Func convertForGUIContent = s => s.ToString(); + public Func ignoreConvertForGUIContent = t => t.Length <= 40; + public Action printContextMenu = null; + public string tooltip = ""; + + private object m_SelectedValue; + + + public void Draw(T selected, T[] options, Action onValueSelected) + { + Draw(null, + selected, + options, + onValueSelected); + } + + public void Draw(string label, T selected, T[] options, Action onValueSelected) + { + Draw(label, selected, () => options, onValueSelected); + } + + public void Draw(string label, T selected, Func loadOptions, Action onValueSelected) + { + if (!string.IsNullOrEmpty(label)) + EditorGUILayout.BeginHorizontal(); + var guiContent = new GUIContent(label); + var labelSize = EditorStyles.label.CalcSize(guiContent); + + if (!string.IsNullOrEmpty(label)) + GUILayout.Label(label, EditorStyles.label, GUILayout.Width(labelSize.x)); + + if (GUILayout.Button(new GUIContent(convertForButtonLabel(selected), tooltip), + EditorStyles.popup, m_ButtonLayoutOptions)) + { + if (Event.current.button == 0) + { + PrintMenu(loadOptions()); + } + else if (printContextMenu != null && Event.current.button == 1) + printContextMenu(selected); + } + + if (m_SelectedValue != null) + { + onValueSelected((T)m_SelectedValue); + m_SelectedValue = null; + } + if (!string.IsNullOrEmpty(label)) + EditorGUILayout.EndHorizontal(); + } + + public void PrintMenu(T[] options) + { + var menu = new GenericMenu(); + foreach (var s in options) + { + var localS = s; + menu.AddItem(new GUIContent((ignoreConvertForGUIContent(options) ? localS.ToString() : convertForGUIContent(localS))), + false, + () => { m_SelectedValue = localS; } + ); + } + menu.ShowAsContext(); + } + } +} diff --git a/Assets/UnityTestTools/Assertions/Editor/DropDownControl.cs.meta b/Assets/UnityTestTools/Assertions/Editor/DropDownControl.cs.meta new file mode 100644 index 0000000..424d243 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Editor/DropDownControl.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 83ec3ed09f8f2f34ea7483e055f6d76d +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Assertions/Editor/GroupByComparerRenderer.cs b/Assets/UnityTestTools/Assertions/Editor/GroupByComparerRenderer.cs new file mode 100644 index 0000000..6d7875b --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Editor/GroupByComparerRenderer.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; + +namespace UnityTest +{ + public class GroupByComparerRenderer : AssertionListRenderer + { + protected override IEnumerable> GroupResult(IEnumerable assertionComponents) + { + return assertionComponents.GroupBy(c => c.Action.GetType()); + } + + protected override string GetStringKey(Type key) + { + return key.Name; + } + } +} diff --git a/Assets/UnityTestTools/Assertions/Editor/GroupByComparerRenderer.cs.meta b/Assets/UnityTestTools/Assertions/Editor/GroupByComparerRenderer.cs.meta new file mode 100644 index 0000000..e917399 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Editor/GroupByComparerRenderer.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: efab536803bd0154a8a7dc78e8767ad9 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Assertions/Editor/GroupByExecutionMethodRenderer.cs b/Assets/UnityTestTools/Assertions/Editor/GroupByExecutionMethodRenderer.cs new file mode 100644 index 0000000..b4b6d3f --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Editor/GroupByExecutionMethodRenderer.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; + +namespace UnityTest +{ + public class GroupByExecutionMethodRenderer : AssertionListRenderer + { + protected override IEnumerable> GroupResult(IEnumerable assertionComponents) + { + var enumVals = Enum.GetValues(typeof(CheckMethod)).Cast(); + var pairs = new List(); + + foreach (var checkMethod in enumVals) + { + var components = assertionComponents.Where(c => (c.checkMethods & checkMethod) == checkMethod); + var componentPairs = components.Select(a => new CheckFunctionAssertionPair {checkMethod = checkMethod, assertionComponent = a}); + pairs.AddRange(componentPairs); + } + return pairs.GroupBy(pair => pair.checkMethod, + pair => pair.assertionComponent); + } + + private class CheckFunctionAssertionPair + { + public AssertionComponent assertionComponent; + public CheckMethod checkMethod; + } + } +} diff --git a/Assets/UnityTestTools/Assertions/Editor/GroupByExecutionMethodRenderer.cs.meta b/Assets/UnityTestTools/Assertions/Editor/GroupByExecutionMethodRenderer.cs.meta new file mode 100644 index 0000000..e542ae1 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Editor/GroupByExecutionMethodRenderer.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 97340abf816b1424fa835a4f26bbdc78 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Assertions/Editor/GroupByGORenderer.cs b/Assets/UnityTestTools/Assertions/Editor/GroupByGORenderer.cs new file mode 100644 index 0000000..6d76ca5 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Editor/GroupByGORenderer.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine; + +namespace UnityTest +{ + public class GroupByGoRenderer : AssertionListRenderer + { + protected override IEnumerable> GroupResult(IEnumerable assertionComponents) + { + return assertionComponents.GroupBy(c => c.gameObject); + } + + protected override bool PrintFoldout(bool isFolded, GameObject key) + { + isFolded = base.PrintFoldout(isFolded, + key); + + EditorGUILayout.ObjectField(key, + typeof(GameObject), + true, + GUILayout.ExpandWidth(false)); + + return isFolded; + } + + protected override string GetFoldoutDisplayName(GameObject key) + { + return key.name; + } + } +} diff --git a/Assets/UnityTestTools/Assertions/Editor/GroupByGORenderer.cs.meta b/Assets/UnityTestTools/Assertions/Editor/GroupByGORenderer.cs.meta new file mode 100644 index 0000000..a11d1dc --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Editor/GroupByGORenderer.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cb824de9146b42343a985aaf63beffd1 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Assertions/Editor/GroupByNothingRenderer.cs b/Assets/UnityTestTools/Assertions/Editor/GroupByNothingRenderer.cs new file mode 100644 index 0000000..db5d824 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Editor/GroupByNothingRenderer.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; + +namespace UnityTest +{ + public class GroupByNothingRenderer : AssertionListRenderer + { + protected override IEnumerable> GroupResult(IEnumerable assertionComponents) + { + return assertionComponents.GroupBy(c => ""); + } + + protected override string GetStringKey(string key) + { + return ""; + } + } +} diff --git a/Assets/UnityTestTools/Assertions/Editor/GroupByNothingRenderer.cs.meta b/Assets/UnityTestTools/Assertions/Editor/GroupByNothingRenderer.cs.meta new file mode 100644 index 0000000..f7d9d2a --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Editor/GroupByNothingRenderer.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 33bf96aa461ea1d478bb757c52f51c95 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Assertions/Editor/GroupByTestsRenderer.cs b/Assets/UnityTestTools/Assertions/Editor/GroupByTestsRenderer.cs new file mode 100644 index 0000000..a126a51 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Editor/GroupByTestsRenderer.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; + +namespace UnityTest +{ + public class GroupByTestsRenderer : AssertionListRenderer + { + protected override IEnumerable> GroupResult(IEnumerable assertionComponents) + { + return assertionComponents.GroupBy(c => + { + var temp = c.transform; + while (temp != null) + { + if (temp.GetComponent("TestComponent") != null) return c.gameObject; + temp = temp.parent.transform; + } + return null; + }); + } + + protected override string GetFoldoutDisplayName(GameObject key) + { + return key.name; + } + } +} diff --git a/Assets/UnityTestTools/Assertions/Editor/GroupByTestsRenderer.cs.meta b/Assets/UnityTestTools/Assertions/Editor/GroupByTestsRenderer.cs.meta new file mode 100644 index 0000000..cbc3124 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Editor/GroupByTestsRenderer.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5e577f31e55208b4d8a1774b958e6ed5 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Assertions/Editor/PropertyPathSelector.cs b/Assets/UnityTestTools/Assertions/Editor/PropertyPathSelector.cs new file mode 100644 index 0000000..3bf3911 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Editor/PropertyPathSelector.cs @@ -0,0 +1,207 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using UnityEditor; +using UnityEngine; + +namespace UnityTest +{ + public class PropertyPathSelector + { + private readonly DropDownControl m_ThisDropDown = new DropDownControl(); + private readonly Func m_ReplaceDotWithSlashAndAddGoGroup = s => s.Replace('.', '/'); + + private readonly string m_Name; + private bool m_FocusBackToEdit; + private SelectedPathError m_Error; + + public PropertyPathSelector(string name) + { + m_Name = name; + m_ThisDropDown.convertForGUIContent = m_ReplaceDotWithSlashAndAddGoGroup; + m_ThisDropDown.tooltip = "Select the path to the value you want to use for comparison."; + } + + public void Draw(GameObject go, ActionBase comparer, string propertPath, Type[] accepatbleTypes, Action onSelectedGo, Action onSelectedPath) + { + var newGo = (GameObject)EditorGUILayout.ObjectField(m_Name, go, typeof(GameObject), true); + if (newGo != go) + onSelectedGo(newGo); + + if (go != null) + { + var newPath = DrawListOfMethods(go, comparer, propertPath, accepatbleTypes, m_ThisDropDown); + + if (newPath != propertPath) + onSelectedPath(newPath); + } + } + + private string DrawListOfMethods(GameObject go, ActionBase comparer, string propertPath, Type[] accepatbleTypes, DropDownControl dropDown) + { + string result = propertPath; + if (accepatbleTypes == null) + { + result = DrawManualPropertyEditField(go, propertPath, accepatbleTypes, dropDown); + } + else + { + bool isPropertyOrFieldFound = true; + if (string.IsNullOrEmpty(result)) + { + var options = GetFieldsAndProperties(go, comparer, result, accepatbleTypes); + isPropertyOrFieldFound = options.Any(); + if (isPropertyOrFieldFound) + { + result = options.First(); + } + } + + if (isPropertyOrFieldFound) + { + dropDown.Draw(go.name + '.', result, + () => + { + try + { + var options = GetFieldsAndProperties(go, comparer, result, accepatbleTypes); + return options.ToArray(); + } + catch (Exception) + { + Debug.LogWarning("An exception was thrown while resolving a property list. Resetting property path."); + result = ""; + return new string[0]; + } + }, s => result = s); + } + else + { + result = DrawManualPropertyEditField(go, propertPath, accepatbleTypes, dropDown); + } + } + return result; + } + + private static List GetFieldsAndProperties(GameObject go, ActionBase comparer, string extendPath, Type[] accepatbleTypes) + { + var propertyResolver = new PropertyResolver {AllowedTypes = accepatbleTypes, ExcludedFieldNames = comparer.GetExcludedFieldNames()}; + var options = propertyResolver.GetFieldsAndPropertiesFromGameObject(go, comparer.GetDepthOfSearch(), extendPath).ToList(); + options.Sort((x, y) => + { + if (char.IsLower(x[0])) + return -1; + if (char.IsLower(y[0])) + return 1; + return x.CompareTo(y); + }); + return options; + } + + private string DrawManualPropertyEditField(GameObject go, string propertPath, Type[] acceptableTypes, DropDownControl dropDown) + { + var propertyResolver = new PropertyResolver { AllowedTypes = acceptableTypes }; + IList list; + + var loadProps = new Func(() => + { + try + { + list = propertyResolver.GetFieldsAndPropertiesUnderPath(go, propertPath); + } + catch (ArgumentException) + { + list = propertyResolver.GetFieldsAndPropertiesUnderPath(go, ""); + } + return list.ToArray(); + }); + + EditorGUILayout.BeginHorizontal(); + + var labelSize = EditorStyles.label.CalcSize(new GUIContent(go.name + '.')); + GUILayout.Label(go.name + (propertPath.Length > 0 ? "." : ""), EditorStyles.label, GUILayout.Width(labelSize.x)); + + string btnName = "hintBtn"; + if (GUI.GetNameOfFocusedControl() == btnName + && Event.current.type == EventType.KeyDown + && Event.current.keyCode == KeyCode.DownArrow) + { + Event.current.Use(); + dropDown.PrintMenu(loadProps()); + GUI.FocusControl(""); + m_FocusBackToEdit = true; + } + + EditorGUI.BeginChangeCheck(); + GUI.SetNextControlName(btnName); + var result = GUILayout.TextField(propertPath, EditorStyles.textField); + if (EditorGUI.EndChangeCheck()) + { + m_Error = DoesPropertyExist(go, result); + } + + if (m_FocusBackToEdit) + { + m_FocusBackToEdit = false; + GUI.FocusControl(btnName); + } + + if (GUILayout.Button("Clear", EditorStyles.miniButton, GUILayout.Width(38))) + { + result = ""; + GUI.FocusControl(null); + m_FocusBackToEdit = true; + m_Error = DoesPropertyExist(go, result); + } + EditorGUILayout.EndHorizontal(); + EditorGUILayout.BeginHorizontal(); + GUILayout.Label("", GUILayout.Width(labelSize.x)); + + dropDown.Draw("", result ?? "", loadProps, s => + { + result = s; + GUI.FocusControl(null); + m_FocusBackToEdit = true; + m_Error = DoesPropertyExist(go, result); + }); + EditorGUILayout.EndHorizontal(); + + switch (m_Error) + { + case SelectedPathError.InvalidPath: + EditorGUILayout.HelpBox("This property does not exist", MessageType.Error); + break; + case SelectedPathError.MissingComponent: + EditorGUILayout.HelpBox("This property or field is not attached or set. It will fail unless it will be attached before the check is perfomed.", MessageType.Warning); + break; + } + + return result; + } + + private SelectedPathError DoesPropertyExist(GameObject go, string propertPath) + { + try + { + object obj; + if (MemberResolver.TryGetValue(go, propertPath, out obj)) + return SelectedPathError.None; + return SelectedPathError.InvalidPath; + } + catch (TargetInvocationException e) + { + if (e.InnerException is MissingComponentException) + return SelectedPathError.MissingComponent; + throw; + } + } + + private enum SelectedPathError + { + None, + MissingComponent, + InvalidPath + } + } +} diff --git a/Assets/UnityTestTools/Assertions/Editor/PropertyPathSelector.cs.meta b/Assets/UnityTestTools/Assertions/Editor/PropertyPathSelector.cs.meta new file mode 100644 index 0000000..b1998a8 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Editor/PropertyPathSelector.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6619da1897737044080bdb8bc60eff87 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Assertions/Editor/PropertyResolver.cs b/Assets/UnityTestTools/Assertions/Editor/PropertyResolver.cs new file mode 100644 index 0000000..5d705da --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Editor/PropertyResolver.cs @@ -0,0 +1,188 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text.RegularExpressions; +using UnityEngine; + +namespace UnityTest +{ + [Serializable] + public class PropertyResolver + { + public string[] ExcludedFieldNames { get; set; } + public Type[] ExcludedTypes { get; set; } + public Type[] AllowedTypes { get; set; } + + public PropertyResolver() + { + ExcludedFieldNames = new string[] { }; + ExcludedTypes = new Type[] { }; + AllowedTypes = new Type[] { }; + } + + public IList GetFieldsAndPropertiesUnderPath(GameObject go, string propertPath) + { + propertPath = propertPath.Trim(); + if (!PropertyPathIsValid(propertPath)) + { + throw new ArgumentException("Incorrect property path: " + propertPath); + } + + var idx = propertPath.LastIndexOf('.'); + + if (idx < 0) + { + var components = GetFieldsAndPropertiesFromGameObject(go, 2, null); + return components; + } + + var propertyToSearch = propertPath; + Type type; + if (MemberResolver.TryGetMemberType(go, propertyToSearch, out type)) + { + idx = propertPath.Length - 1; + } + else + { + propertyToSearch = propertPath.Substring(0, idx); + if (!MemberResolver.TryGetMemberType(go, propertyToSearch, out type)) + { + var components = GetFieldsAndPropertiesFromGameObject(go, 2, null); + return components.Where(s => s.StartsWith(propertPath.Substring(idx + 1))).ToArray(); + } + } + + var resultList = new List(); + var path = ""; + if (propertyToSearch.EndsWith(".")) + propertyToSearch = propertyToSearch.Substring(0, propertyToSearch.Length - 1); + foreach (var c in propertyToSearch) + { + if (c == '.') + resultList.Add(path); + path += c; + } + resultList.Add(path); + foreach (var prop in type.GetProperties().Where(info => info.GetIndexParameters().Length == 0)) + { + if (prop.Name.StartsWith(propertPath.Substring(idx + 1))) + resultList.Add(propertyToSearch + "." + prop.Name); + } + foreach (var prop in type.GetFields()) + { + if (prop.Name.StartsWith(propertPath.Substring(idx + 1))) + resultList.Add(propertyToSearch + "." + prop.Name); + } + return resultList.ToArray(); + } + + internal bool PropertyPathIsValid(string propertPath) + { + if (propertPath.StartsWith(".")) + return false; + if (propertPath.IndexOf("..") >= 0) + return false; + if (Regex.IsMatch(propertPath, @"\s")) + return false; + return true; + } + + public IList GetFieldsAndPropertiesFromGameObject(GameObject gameObject, int depthOfSearch, string extendPath) + { + if (depthOfSearch < 1) throw new ArgumentOutOfRangeException("depthOfSearch has to be greater than 0"); + + var goVals = GetPropertiesAndFieldsFromType(typeof(GameObject), + depthOfSearch - 1).Select(s => "gameObject." + s); + + var result = new List(); + if (AllowedTypes == null || !AllowedTypes.Any() || AllowedTypes.Contains(typeof(GameObject))) + result.Add("gameObject"); + result.AddRange(goVals); + + foreach (var componentType in GetAllComponents(gameObject)) + { + if (AllowedTypes == null || !AllowedTypes.Any() || AllowedTypes.Any(t => t.IsAssignableFrom(componentType))) + result.Add(componentType.Name); + + if (depthOfSearch > 1) + { + var vals = GetPropertiesAndFieldsFromType(componentType, depthOfSearch - 1); + var valsFullName = vals.Select(s => componentType.Name + "." + s); + result.AddRange(valsFullName); + } + } + + if (!string.IsNullOrEmpty(extendPath)) + { + var memberResolver = new MemberResolver(gameObject, extendPath); + var pathType = memberResolver.GetMemberType(); + var vals = GetPropertiesAndFieldsFromType(pathType, depthOfSearch - 1); + var valsFullName = vals.Select(s => extendPath + "." + s); + result.AddRange(valsFullName); + } + + return result; + } + + private string[] GetPropertiesAndFieldsFromType(Type type, int level) + { + level--; + + var result = new List(); + var fields = new List(); + fields.AddRange(type.GetFields().Where(f => !Attribute.IsDefined(f, typeof(ObsoleteAttribute))).ToArray()); + fields.AddRange(type.GetProperties().Where(info => info.GetIndexParameters().Length == 0 && !Attribute.IsDefined(info, typeof(ObsoleteAttribute))).ToArray()); + + foreach (var member in fields) + { + var memberType = GetMemberFieldType(member); + var memberTypeName = memberType.Name; + + if (AllowedTypes == null + || !AllowedTypes.Any() + || (AllowedTypes.Any(t => t.IsAssignableFrom(memberType)) && !ExcludedFieldNames.Contains(memberTypeName))) + { + result.Add(member.Name); + } + + if (level > 0 && IsTypeOrNameNotExcluded(memberType, memberTypeName)) + { + var vals = GetPropertiesAndFieldsFromType(memberType, level); + var valsFullName = vals.Select(s => member.Name + "." + s); + result.AddRange(valsFullName); + } + } + return result.ToArray(); + } + + private Type GetMemberFieldType(MemberInfo info) + { + if (info.MemberType == MemberTypes.Property) + return (info as PropertyInfo).PropertyType; + if (info.MemberType == MemberTypes.Field) + return (info as FieldInfo).FieldType; + throw new Exception("Only properties and fields are allowed"); + } + + internal Type[] GetAllComponents(GameObject gameObject) + { + var result = new List(); + var components = gameObject.GetComponents(typeof(Component)); + foreach (var component in components) + { + var componentType = component.GetType(); + if (IsTypeOrNameNotExcluded(componentType, null)) + { + result.Add(componentType); + } + } + return result.ToArray(); + } + + private bool IsTypeOrNameNotExcluded(Type memberType, string memberTypeName) + { + return !ExcludedTypes.Contains(memberType) && !ExcludedFieldNames.Contains(memberTypeName); + } + } +} diff --git a/Assets/UnityTestTools/Assertions/Editor/PropertyResolver.cs.meta b/Assets/UnityTestTools/Assertions/Editor/PropertyResolver.cs.meta new file mode 100644 index 0000000..22210c7 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/Editor/PropertyResolver.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bbbd193a27920d9478c2a766a7291d72 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Assertions/InvalidPathException.cs b/Assets/UnityTestTools/Assertions/InvalidPathException.cs new file mode 100644 index 0000000..9ddde07 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/InvalidPathException.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace UnityTest +{ + public class InvalidPathException : Exception + { + public InvalidPathException(string path) + : base("Invalid path part " + path) + { + } + } +} diff --git a/Assets/UnityTestTools/Assertions/InvalidPathException.cs.meta b/Assets/UnityTestTools/Assertions/InvalidPathException.cs.meta new file mode 100644 index 0000000..a5f882d --- /dev/null +++ b/Assets/UnityTestTools/Assertions/InvalidPathException.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3b85786dfd1aef544bf8bb873d6a4ebb +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Assertions/MemberResolver.cs b/Assets/UnityTestTools/Assertions/MemberResolver.cs new file mode 100644 index 0000000..abd292a --- /dev/null +++ b/Assets/UnityTestTools/Assertions/MemberResolver.cs @@ -0,0 +1,208 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Text.RegularExpressions; +using UnityEngine; + +namespace UnityTest +{ + public class MemberResolver + { + private object m_CallingObjectRef; + private MemberInfo[] m_Callstack; + private readonly GameObject m_GameObject; + private readonly string m_Path; + + public MemberResolver(GameObject gameObject, string path) + { + path = path.Trim(); + ValidatePath(path); + + m_GameObject = gameObject; + m_Path = path.Trim(); + } + + public object GetValue(bool useCache) + { + if (useCache && m_CallingObjectRef != null) + { + object val = m_CallingObjectRef; + for (int i = 0; i < m_Callstack.Length; i++) + val = GetValueFromMember(val, m_Callstack[i]); + return val; + } + + object result = GetBaseObject(); + var fullCallStack = GetCallstack(); + + m_CallingObjectRef = result; + var tempCallstack = new List(); + for (int i = 0; i < fullCallStack.Length; i++) + { + var member = fullCallStack[i]; + result = GetValueFromMember(result, member); + tempCallstack.Add(member); + if (result == null) return null; + var type = result.GetType(); + + //String is not a value type but we don't want to cache it + if (!IsValueType(type) && type != typeof(System.String)) + { + tempCallstack.Clear(); + m_CallingObjectRef = result; + } + } + m_Callstack = tempCallstack.ToArray(); + return result; + } + + public Type GetMemberType() + { + var callstack = GetCallstack(); + if (callstack.Length == 0) return GetBaseObject().GetType(); + + var member = callstack[callstack.Length - 1]; + if (member is FieldInfo) + return (member as FieldInfo).FieldType; + if (member is MethodInfo) + return (member as MethodInfo).ReturnType; + return null; + } + + #region Static wrappers + public static bool TryGetMemberType(GameObject gameObject, string path, out Type value) + { + try + { + var mr = new MemberResolver(gameObject, path); + value = mr.GetMemberType(); + return true; + } + catch (InvalidPathException) + { + value = null; + return false; + } + } + + public static bool TryGetValue(GameObject gameObject, string path, out object value) + { + try + { + var mr = new MemberResolver(gameObject, path); + value = mr.GetValue(false); + return true; + } + catch (InvalidPathException) + { + value = null; + return false; + } + } + #endregion + + private object GetValueFromMember(object obj, MemberInfo memberInfo) + { + if (memberInfo is FieldInfo) + return (memberInfo as FieldInfo).GetValue(obj); + if (memberInfo is MethodInfo) + return (memberInfo as MethodInfo).Invoke(obj, null); + throw new InvalidPathException(memberInfo.Name); + } + + private object GetBaseObject() + { + if (string.IsNullOrEmpty(m_Path)) return m_GameObject; + var firstElement = m_Path.Split('.')[0]; + var comp = m_GameObject.GetComponent(firstElement); + if (comp != null) + return comp; + return m_GameObject; + } + + private MemberInfo[] GetCallstack() + { + if (m_Path == "") return new MemberInfo[0]; + var propsQueue = new Queue(m_Path.Split('.')); + + Type type = GetBaseObject().GetType(); + if (type != typeof(GameObject)) + propsQueue.Dequeue(); + + PropertyInfo propertyTemp; + FieldInfo fieldTemp; + var list = new List(); + while (propsQueue.Count != 0) + { + var nameToFind = propsQueue.Dequeue(); + fieldTemp = GetField(type, nameToFind); + if (fieldTemp != null) + { + type = fieldTemp.FieldType; + list.Add(fieldTemp); + continue; + } + propertyTemp = GetProperty(type, nameToFind); + if (propertyTemp != null) + { + type = propertyTemp.PropertyType; + var getMethod = GetGetMethod(propertyTemp); + list.Add(getMethod); + continue; + } + throw new InvalidPathException(nameToFind); + } + return list.ToArray(); + } + + private void ValidatePath(string path) + { + bool invalid = false; + if (path.StartsWith(".") || path.EndsWith(".")) + invalid = true; + if (path.IndexOf("..") >= 0) + invalid = true; + if (Regex.IsMatch(path, @"\s")) + invalid = true; + + if (invalid) + throw new InvalidPathException(path); + } + + private static bool IsValueType(Type type) + { + #if !UNITY_METRO + return type.IsValueType; + #else + return false; + #endif + } + + private static FieldInfo GetField(Type type, string fieldName) + { + #if !UNITY_METRO + return type.GetField(fieldName); + #else + return null; + #endif + } + + private static PropertyInfo GetProperty(Type type, string propertyName) + { + #if !UNITY_METRO + return type.GetProperty(propertyName); + #else + return null; + #endif + } + + private static MethodInfo GetGetMethod(PropertyInfo propertyInfo) + { + #if !UNITY_METRO + return propertyInfo.GetGetMethod(); + #else + return null; + #endif + } + } +} diff --git a/Assets/UnityTestTools/Assertions/MemberResolver.cs.meta b/Assets/UnityTestTools/Assertions/MemberResolver.cs.meta new file mode 100644 index 0000000..6b1ea42 --- /dev/null +++ b/Assets/UnityTestTools/Assertions/MemberResolver.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 80df8ef907961e34dbcc7c89b22729b9 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Common.meta b/Assets/UnityTestTools/Common.meta new file mode 100644 index 0000000..5f0acfe --- /dev/null +++ b/Assets/UnityTestTools/Common.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: a2caba6436df568499c84c1c607ce766 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/Common/Editor.meta b/Assets/UnityTestTools/Common/Editor.meta new file mode 100644 index 0000000..2021d4f --- /dev/null +++ b/Assets/UnityTestTools/Common/Editor.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: f4ab061d0035ee545a936bdf8f3f8620 +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/Common/Editor/Icons.cs b/Assets/UnityTestTools/Common/Editor/Icons.cs new file mode 100644 index 0000000..8fd7bfa --- /dev/null +++ b/Assets/UnityTestTools/Common/Editor/Icons.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using UnityEditor; +using UnityEngine; + +namespace UnityTest +{ + public static class Icons + { + const string k_IconsFolderName = "icons"; + private static readonly string k_IconsFolderPath = String.Format("UnityTestTools{0}Common{0}Editor{0}{1}", Path.DirectorySeparatorChar, k_IconsFolderName); + + private static readonly string k_IconsAssetsPath = ""; + + public static readonly Texture2D FailImg; + public static readonly Texture2D IgnoreImg; + public static readonly Texture2D SuccessImg; + public static readonly Texture2D UnknownImg; + public static readonly Texture2D InconclusiveImg; + public static readonly Texture2D StopwatchImg; + + public static readonly GUIContent GUIUnknownImg; + public static readonly GUIContent GUIInconclusiveImg; + public static readonly GUIContent GUIIgnoreImg; + public static readonly GUIContent GUISuccessImg; + public static readonly GUIContent GUIFailImg; + + static Icons() + { + var dirs = Directory.GetDirectories("Assets", k_IconsFolderName, SearchOption.AllDirectories).Where(s => s.EndsWith(k_IconsFolderPath)); + if (dirs.Any()) + k_IconsAssetsPath = dirs.First(); + else + Debug.LogWarning("The UnityTestTools asset folder path is incorrect. If you relocated the tools please change the path accordingly (Icons.cs)."); + + FailImg = LoadTexture("failed.png"); + IgnoreImg = LoadTexture("ignored.png"); + SuccessImg = LoadTexture("passed.png"); + UnknownImg = LoadTexture("normal.png"); + InconclusiveImg = LoadTexture("inconclusive.png"); + StopwatchImg = LoadTexture("stopwatch.png"); + + GUIUnknownImg = new GUIContent(UnknownImg); + GUIInconclusiveImg = new GUIContent(InconclusiveImg); + GUIIgnoreImg = new GUIContent(IgnoreImg); + GUISuccessImg = new GUIContent(SuccessImg); + GUIFailImg = new GUIContent(FailImg); + } + + private static Texture2D LoadTexture(string fileName) + { + return (Texture2D)AssetDatabase.LoadAssetAtPath(k_IconsAssetsPath + Path.DirectorySeparatorChar + fileName, typeof(Texture2D)); + } + } +} diff --git a/Assets/UnityTestTools/Common/Editor/Icons.cs.meta b/Assets/UnityTestTools/Common/Editor/Icons.cs.meta new file mode 100644 index 0000000..267269a --- /dev/null +++ b/Assets/UnityTestTools/Common/Editor/Icons.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8571844b0c115b84cbe8b3f67e8dec04 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Common/Editor/ProjectSettingsBase.cs b/Assets/UnityTestTools/Common/Editor/ProjectSettingsBase.cs new file mode 100644 index 0000000..99cafad --- /dev/null +++ b/Assets/UnityTestTools/Common/Editor/ProjectSettingsBase.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using UnityEditor; +using UnityEngine; + +namespace UnityTest +{ + public abstract class ProjectSettingsBase : ScriptableObject + { + private static readonly string k_SettingsPath = Path.Combine("UnityTestTools", "Common"); + const string k_SettingsFolder = "Settings"; + + public virtual void Save() + { + EditorUtility.SetDirty(this); + } + + public static T Load() where T : ProjectSettingsBase, new () + { + var pathsInProject = Directory.GetDirectories("Assets", "*", SearchOption.AllDirectories) + .Where(s => s.Contains(k_SettingsPath)); + + if (pathsInProject.Count() == 0) Debug.LogError("Can't find settings path: " + k_SettingsPath); + + string pathInProject = Path.Combine(pathsInProject.First(), k_SettingsFolder); + var assetPath = Path.Combine(pathInProject, typeof(T).Name) + ".asset"; + var settings = AssetDatabase.LoadAssetAtPath(assetPath, typeof(T)) as T; + + if (settings != null) return settings; + + settings = CreateInstance(); + Directory.CreateDirectory(pathInProject); + AssetDatabase.CreateAsset(settings, assetPath); + return settings; + } + } +} diff --git a/Assets/UnityTestTools/Common/Editor/ProjectSettingsBase.cs.meta b/Assets/UnityTestTools/Common/Editor/ProjectSettingsBase.cs.meta new file mode 100644 index 0000000..db5944b --- /dev/null +++ b/Assets/UnityTestTools/Common/Editor/ProjectSettingsBase.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9ac961be07107124a88dcb81927143d4 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Common/Editor/ResultWriter.meta b/Assets/UnityTestTools/Common/Editor/ResultWriter.meta new file mode 100644 index 0000000..9b2e13b --- /dev/null +++ b/Assets/UnityTestTools/Common/Editor/ResultWriter.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 4ffbf5a07740aa5479651bd415f52ebb +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/Common/Editor/ResultWriter/ResultSummarizer.cs b/Assets/UnityTestTools/Common/Editor/ResultWriter/ResultSummarizer.cs new file mode 100644 index 0000000..cfd39ca --- /dev/null +++ b/Assets/UnityTestTools/Common/Editor/ResultWriter/ResultSummarizer.cs @@ -0,0 +1,173 @@ +// **************************************************************** +// Based on nUnit 2.6.2 (http://www.nunit.org/) +// **************************************************************** + +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace UnityTest +{ + /// + /// Summary description for ResultSummarizer. + /// + public class ResultSummarizer + { + private int m_ErrorCount; + private int m_FailureCount; + private int m_IgnoreCount; + private int m_InconclusiveCount; + private int m_NotRunnable; + private int m_ResultCount; + private int m_SkipCount; + private int m_SuccessCount; + private int m_TestsRun; + + private TimeSpan m_Duration; + + public ResultSummarizer(IEnumerable results) + { + foreach (var result in results) + Summarize(result); + } + + public bool Success + { + get { return m_FailureCount == 0; } + } + + /// + /// Returns the number of test cases for which results + /// have been summarized. Any tests excluded by use of + /// Category or Explicit attributes are not counted. + /// + public int ResultCount + { + get { return m_ResultCount; } + } + + /// + /// Returns the number of test cases actually run, which + /// is the same as ResultCount, less any Skipped, Ignored + /// or NonRunnable tests. + /// + public int TestsRun + { + get { return m_TestsRun; } + } + + /// + /// Returns the number of tests that passed + /// + public int Passed + { + get { return m_SuccessCount; } + } + + /// + /// Returns the number of test cases that had an error. + /// + public int Errors + { + get { return m_ErrorCount; } + } + + /// + /// Returns the number of test cases that failed. + /// + public int Failures + { + get { return m_FailureCount; } + } + + /// + /// Returns the number of test cases that failed. + /// + public int Inconclusive + { + get { return m_InconclusiveCount; } + } + + /// + /// Returns the number of test cases that were not runnable + /// due to errors in the signature of the class or method. + /// Such tests are also counted as Errors. + /// + public int NotRunnable + { + get { return m_NotRunnable; } + } + + /// + /// Returns the number of test cases that were skipped. + /// + public int Skipped + { + get { return m_SkipCount; } + } + + public int Ignored + { + get { return m_IgnoreCount; } + } + + public double Duration + { + get { return m_Duration.TotalSeconds; } + } + + public int TestsNotRun + { + get { return m_SkipCount + m_IgnoreCount + m_NotRunnable; } + } + + public void Summarize(ITestResult result) + { + m_Duration += TimeSpan.FromSeconds(result.Duration); + m_ResultCount++; + + if(!result.Executed) + { + if(result.IsIgnored) + { + m_IgnoreCount++; + return; + } + + m_SkipCount++; + return; + } + + switch (result.ResultState) + { + case TestResultState.Success: + m_SuccessCount++; + m_TestsRun++; + break; + case TestResultState.Failure: + m_FailureCount++; + m_TestsRun++; + break; + case TestResultState.Error: + case TestResultState.Cancelled: + m_ErrorCount++; + m_TestsRun++; + break; + case TestResultState.Inconclusive: + m_InconclusiveCount++; + m_TestsRun++; + break; + case TestResultState.NotRunnable: + m_NotRunnable++; + // errorCount++; + break; + case TestResultState.Ignored: + m_IgnoreCount++; + break; + default: + m_SkipCount++; + break; + } + } + } +} diff --git a/Assets/UnityTestTools/Common/Editor/ResultWriter/ResultSummarizer.cs.meta b/Assets/UnityTestTools/Common/Editor/ResultWriter/ResultSummarizer.cs.meta new file mode 100644 index 0000000..ca3c41f --- /dev/null +++ b/Assets/UnityTestTools/Common/Editor/ResultWriter/ResultSummarizer.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ce89106be5bd4204388d58510e4e55da +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Common/Editor/ResultWriter/StackTraceFilter.cs b/Assets/UnityTestTools/Common/Editor/ResultWriter/StackTraceFilter.cs new file mode 100644 index 0000000..686de92 --- /dev/null +++ b/Assets/UnityTestTools/Common/Editor/ResultWriter/StackTraceFilter.cs @@ -0,0 +1,62 @@ +// **************************************************************** +// Based on nUnit 2.6.2 (http://www.nunit.org/) +// **************************************************************** + +using System; +using System.Collections.Generic; +using System.IO; +using UnityEngine; + +namespace UnityTest +{ + /// + /// Summary description for StackTraceFilter. + /// + public class StackTraceFilter + { + public static string Filter(string stack) + { + if (stack == null) return null; + var sw = new StringWriter(); + var sr = new StringReader(stack); + + try + { + string line; + while ((line = sr.ReadLine()) != null) + { + if (!FilterLine(line)) + sw.WriteLine(line.Trim()); + } + } + catch (Exception) + { + return stack; + } + return sw.ToString(); + } + + static bool FilterLine(string line) + { + string[] patterns = + { + "NUnit.Core.TestCase", + "NUnit.Core.ExpectedExceptionTestCase", + "NUnit.Core.TemplateTestCase", + "NUnit.Core.TestResult", + "NUnit.Core.TestSuite", + "NUnit.Framework.Assertion", + "NUnit.Framework.Assert", + "System.Reflection.MonoMethod" + }; + + for (int i = 0; i < patterns.Length; i++) + { + if (line.IndexOf(patterns[i]) > 0) + return true; + } + + return false; + } + } +} diff --git a/Assets/UnityTestTools/Common/Editor/ResultWriter/StackTraceFilter.cs.meta b/Assets/UnityTestTools/Common/Editor/ResultWriter/StackTraceFilter.cs.meta new file mode 100644 index 0000000..7051843 --- /dev/null +++ b/Assets/UnityTestTools/Common/Editor/ResultWriter/StackTraceFilter.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fe6b4d68575d4ba44b1d5c5c3f0e96d3 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Common/Editor/ResultWriter/XmlResultWriter.cs b/Assets/UnityTestTools/Common/Editor/ResultWriter/XmlResultWriter.cs new file mode 100644 index 0000000..ac4ca73 --- /dev/null +++ b/Assets/UnityTestTools/Common/Editor/ResultWriter/XmlResultWriter.cs @@ -0,0 +1,303 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Security; +using System.Text; +using UnityEngine; + +namespace UnityTest +{ + public class XmlResultWriter + { + private readonly StringBuilder m_ResultWriter = new StringBuilder(); + private int m_Indend; + private readonly string m_SuiteName; + private readonly ITestResult[] m_Results; + string m_Platform; + + public XmlResultWriter(string suiteName, string platform, ITestResult[] results) + { + m_SuiteName = suiteName; + m_Results = results; + m_Platform = platform; + } + + private const string k_NUnitVersion = "2.6.2-Unity"; + + public string GetTestResult() + { + InitializeXmlFile(m_SuiteName, new ResultSummarizer(m_Results)); + foreach (var result in m_Results) + { + WriteResultElement(result); + } + TerminateXmlFile(); + return m_ResultWriter.ToString(); + } + + private void InitializeXmlFile(string resultsName, ResultSummarizer summaryResults) + { + WriteHeader(); + + DateTime now = DateTime.Now; + var attributes = new Dictionary + { + {"name", "Unity Tests"}, + {"total", summaryResults.TestsRun.ToString()}, + {"errors", summaryResults.Errors.ToString()}, + {"failures", summaryResults.Failures.ToString()}, + {"not-run", summaryResults.TestsNotRun.ToString()}, + {"inconclusive", summaryResults.Inconclusive.ToString()}, + {"ignored", summaryResults.Ignored.ToString()}, + {"skipped", summaryResults.Skipped.ToString()}, + {"invalid", summaryResults.NotRunnable.ToString()}, + {"date", now.ToString("yyyy-MM-dd")}, + {"time", now.ToString("HH:mm:ss")} + }; + + WriteOpeningElement("test-results", attributes); + + WriteEnvironment(m_Platform); + WriteCultureInfo(); + WriteTestSuite(resultsName, summaryResults); + WriteOpeningElement("results"); + } + + private void WriteOpeningElement(string elementName) + { + WriteOpeningElement(elementName, new Dictionary()); + } + + private void WriteOpeningElement(string elementName, Dictionary attributes) + { + WriteOpeningElement(elementName, attributes, false); + } + + + private void WriteOpeningElement(string elementName, Dictionary attributes, bool closeImmediatelly) + { + WriteIndend(); + m_Indend++; + m_ResultWriter.Append("<"); + m_ResultWriter.Append(elementName); + foreach (var attribute in attributes) + { + m_ResultWriter.AppendFormat(" {0}=\"{1}\"", attribute.Key, SecurityElement.Escape(attribute.Value)); + } + if (closeImmediatelly) + { + m_ResultWriter.Append(" /"); + m_Indend--; + } + m_ResultWriter.AppendLine(">"); + } + + private void WriteIndend() + { + for (int i = 0; i < m_Indend; i++) + { + m_ResultWriter.Append(" "); + } + } + + private void WriteClosingElement(string elementName) + { + m_Indend--; + WriteIndend(); + m_ResultWriter.AppendLine(""); + } + + private void WriteHeader() + { + m_ResultWriter.AppendLine(""); + m_ResultWriter.AppendLine(""); + } + + static string GetEnvironmentUserName() + { + return Environment.UserName; + } + + static string GetEnvironmentMachineName() + { + return Environment.MachineName; + } + + static string GetEnvironmentUserDomainName() + { + return Environment.UserDomainName; + } + + static string GetEnvironmentVersion() + { + return Environment.Version.ToString(); + } + + static string GetEnvironmentOSVersion() + { + return Environment.OSVersion.ToString(); + } + + static string GetEnvironmentOSVersionPlatform() + { + return Environment.OSVersion.Platform.ToString(); + } + + static string EnvironmentGetCurrentDirectory() + { + return Environment.CurrentDirectory; + } + + private void WriteEnvironment( string targetPlatform ) + { + var attributes = new Dictionary + { + {"nunit-version", k_NUnitVersion}, + {"clr-version", GetEnvironmentVersion()}, + {"os-version", GetEnvironmentOSVersion()}, + {"platform", GetEnvironmentOSVersionPlatform()}, + {"cwd", EnvironmentGetCurrentDirectory()}, + {"machine-name", GetEnvironmentMachineName()}, + {"user", GetEnvironmentUserName()}, + {"user-domain", GetEnvironmentUserDomainName()}, + {"unity-version", Application.unityVersion}, + {"unity-platform", targetPlatform} + }; + WriteOpeningElement("environment", attributes, true); + } + + private void WriteCultureInfo() + { + var attributes = new Dictionary + { + {"current-culture", CultureInfo.CurrentCulture.ToString()}, + {"current-uiculture", CultureInfo.CurrentUICulture.ToString()} + }; + WriteOpeningElement("culture-info", attributes, true); + } + + private void WriteTestSuite(string resultsName, ResultSummarizer summaryResults) + { + var attributes = new Dictionary + { + {"name", resultsName}, + {"type", "Assembly"}, + {"executed", "True"}, + {"result", summaryResults.Success ? "Success" : "Failure"}, + {"success", summaryResults.Success ? "True" : "False"}, + {"time", summaryResults.Duration.ToString("#####0.000", NumberFormatInfo.InvariantInfo)} + }; + WriteOpeningElement("test-suite", attributes); + } + + private void WriteResultElement(ITestResult result) + { + StartTestElement(result); + + switch (result.ResultState) + { + case TestResultState.Ignored: + case TestResultState.NotRunnable: + case TestResultState.Skipped: + WriteReasonElement(result); + break; + + case TestResultState.Failure: + case TestResultState.Error: + case TestResultState.Cancelled: + WriteFailureElement(result); + break; + case TestResultState.Success: + case TestResultState.Inconclusive: + if (result.Message != null) + WriteReasonElement(result); + break; + }; + + WriteClosingElement("test-case"); + } + + private void TerminateXmlFile() + { + WriteClosingElement("results"); + WriteClosingElement("test-suite"); + WriteClosingElement("test-results"); + } + + #region Element Creation Helpers + + private void StartTestElement(ITestResult result) + { + var attributes = new Dictionary + { + {"name", result.FullName}, + {"executed", result.Executed.ToString()} + }; + string resultString; + switch (result.ResultState) + { + case TestResultState.Cancelled: + resultString = TestResultState.Failure.ToString(); + break; + default: + resultString = result.ResultState.ToString(); + break; + } + attributes.Add("result", resultString); + if (result.Executed) + { + attributes.Add("success", result.IsSuccess.ToString()); + attributes.Add("time", result.Duration.ToString("#####0.000", NumberFormatInfo.InvariantInfo)); + } + WriteOpeningElement("test-case", attributes); + } + + private void WriteReasonElement(ITestResult result) + { + WriteOpeningElement("reason"); + WriteOpeningElement("message"); + WriteCData(result.Message); + WriteClosingElement("message"); + WriteClosingElement("reason"); + } + + private void WriteFailureElement(ITestResult result) + { + WriteOpeningElement("failure"); + WriteOpeningElement("message"); + WriteCData(result.Message); + WriteClosingElement("message"); + WriteOpeningElement("stack-trace"); + if (result.StackTrace != null) + WriteCData(StackTraceFilter.Filter(result.StackTrace)); + WriteClosingElement("stack-trace"); + WriteClosingElement("failure"); + } + + #endregion + + private void WriteCData(string text) + { + if (string.IsNullOrEmpty(text)) + return; + m_ResultWriter.AppendFormat("", text); + m_ResultWriter.AppendLine(); + } + + public void WriteToFile(string resultDestiantion, string resultFileName) + { + try + { + var path = Path.Combine(resultDestiantion, resultFileName); + Debug.Log("Saving results in " + path); + File.WriteAllText(path, GetTestResult(), Encoding.UTF8); + } + catch (Exception e) + { + Debug.LogError("Error while opening file"); + Debug.LogException(e); + } + } + } +} diff --git a/Assets/UnityTestTools/Common/Editor/ResultWriter/XmlResultWriter.cs.meta b/Assets/UnityTestTools/Common/Editor/ResultWriter/XmlResultWriter.cs.meta new file mode 100644 index 0000000..2fffa90 --- /dev/null +++ b/Assets/UnityTestTools/Common/Editor/ResultWriter/XmlResultWriter.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e9bba41ace7686d4ab0c400d1e7f55b7 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Common/Editor/Styles.cs b/Assets/UnityTestTools/Common/Editor/Styles.cs new file mode 100644 index 0000000..0caf6e1 --- /dev/null +++ b/Assets/UnityTestTools/Common/Editor/Styles.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + +namespace UnityTest +{ + public static class Styles + { + public static GUIStyle info; + public static GUIStyle testList; + + public static GUIStyle selectedFoldout; + public static GUIStyle foldout; + public static GUIStyle toolbarLabel; + + public static GUIStyle testName; + + private static readonly Color k_SelectedColor = new Color(0.3f, 0.5f, 0.85f); + + static Styles() + { + info = new GUIStyle(EditorStyles.wordWrappedLabel); + info.wordWrap = false; + info.stretchHeight = true; + info.margin.right = 15; + + testList = new GUIStyle("CN Box"); + testList.margin.top = 0; + testList.padding.left = 3; + + foldout = new GUIStyle(EditorStyles.foldout); + selectedFoldout = new GUIStyle(EditorStyles.foldout); + selectedFoldout.onFocused.textColor = selectedFoldout.focused.textColor = + selectedFoldout.onActive.textColor = selectedFoldout.active.textColor = + selectedFoldout.onNormal.textColor = selectedFoldout.normal.textColor = k_SelectedColor; + + toolbarLabel = new GUIStyle(EditorStyles.toolbarButton); + toolbarLabel.normal.background = null; + toolbarLabel.contentOffset = new Vector2(0, -2); + + testName = new GUIStyle(EditorStyles.label); + testName.padding.left += 12; + testName.focused.textColor = testName.onFocused.textColor = k_SelectedColor; + } + } +} diff --git a/Assets/UnityTestTools/Common/Editor/Styles.cs.meta b/Assets/UnityTestTools/Common/Editor/Styles.cs.meta new file mode 100644 index 0000000..294a619 --- /dev/null +++ b/Assets/UnityTestTools/Common/Editor/Styles.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a8b92379e11501742b1badcbb08da812 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Common/Editor/TestFilterSettings.cs b/Assets/UnityTestTools/Common/Editor/TestFilterSettings.cs new file mode 100644 index 0000000..cef016a --- /dev/null +++ b/Assets/UnityTestTools/Common/Editor/TestFilterSettings.cs @@ -0,0 +1,104 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; +using System.Linq; + +namespace UnityTest +{ + public class TestFilterSettings + { + public bool ShowSucceeded; + public bool ShowFailed; + public bool ShowIgnored; + public bool ShowNotRun; + + public string FilterByName; + public int FilterByCategory; + + private GUIContent _succeededBtn; + private GUIContent _failedBtn; + private GUIContent _ignoredBtn; + private GUIContent _notRunBtn; + + public string[] AvailableCategories; + + private readonly string _prefsKey; + + public TestFilterSettings(string prefsKey) + { + _prefsKey = prefsKey; + Load(); + UpdateCounters(Enumerable.Empty()); + } + + public void Load() + { + ShowSucceeded = EditorPrefs.GetBool(_prefsKey + ".ShowSucceeded", true); + ShowFailed = EditorPrefs.GetBool(_prefsKey + ".ShowFailed", true); + ShowIgnored = EditorPrefs.GetBool(_prefsKey + ".ShowIgnored", true); + ShowNotRun = EditorPrefs.GetBool(_prefsKey + ".ShowNotRun", true); + FilterByName = EditorPrefs.GetString(_prefsKey + ".FilterByName", string.Empty); + FilterByCategory = EditorPrefs.GetInt(_prefsKey + ".FilterByCategory", 0); + } + + public void Save() + { + EditorPrefs.SetBool(_prefsKey + ".ShowSucceeded", ShowSucceeded); + EditorPrefs.SetBool(_prefsKey + ".ShowFailed", ShowFailed); + EditorPrefs.SetBool(_prefsKey + ".ShowIgnored", ShowIgnored); + EditorPrefs.SetBool(_prefsKey + ".ShowNotRun", ShowNotRun); + EditorPrefs.SetString(_prefsKey + ".FilterByName", FilterByName); + EditorPrefs.SetInt(_prefsKey + ".FilterByCategory", FilterByCategory); + } + + public void UpdateCounters(IEnumerable results) + { + var summary = new ResultSummarizer(results); + + _succeededBtn = new GUIContent(summary.Passed.ToString(), Icons.SuccessImg, "Show tests that succeeded"); + _failedBtn = new GUIContent((summary.Errors + summary.Failures + summary.Inconclusive).ToString(), Icons.FailImg, "Show tests that failed"); + _ignoredBtn = new GUIContent((summary.Ignored + summary.NotRunnable).ToString(), Icons.IgnoreImg, "Show tests that are ignored"); + _notRunBtn = new GUIContent((summary.TestsNotRun - summary.Ignored - summary.NotRunnable).ToString(), Icons.UnknownImg, "Show tests that didn't run"); + } + + public string[] GetSelectedCategories() + { + if(AvailableCategories == null) return new string[0]; + + return AvailableCategories.Where ((c, i) => (FilterByCategory & (1 << i)) != 0).ToArray(); + } + + public void OnGUI() + { + EditorGUI.BeginChangeCheck(); + + FilterByName = GUILayout.TextField(FilterByName, "ToolbarSeachTextField", GUILayout.MinWidth(100), GUILayout.MaxWidth(250), GUILayout.ExpandWidth(true)); + if(GUILayout.Button (GUIContent.none, string.IsNullOrEmpty(FilterByName) ? "ToolbarSeachCancelButtonEmpty" : "ToolbarSeachCancelButton")) + FilterByName = string.Empty; + + if (AvailableCategories != null && AvailableCategories.Length > 0) + FilterByCategory = EditorGUILayout.MaskField(FilterByCategory, AvailableCategories, EditorStyles.toolbarDropDown, GUILayout.MaxWidth(90)); + + ShowSucceeded = GUILayout.Toggle(ShowSucceeded, _succeededBtn, EditorStyles.toolbarButton); + ShowFailed = GUILayout.Toggle(ShowFailed, _failedBtn, EditorStyles.toolbarButton); + ShowIgnored = GUILayout.Toggle(ShowIgnored, _ignoredBtn, EditorStyles.toolbarButton); + ShowNotRun = GUILayout.Toggle(ShowNotRun, _notRunBtn, EditorStyles.toolbarButton); + + if(EditorGUI.EndChangeCheck()) Save (); + } + + public RenderingOptions BuildRenderingOptions() + { + var options = new RenderingOptions(); + options.showSucceeded = ShowSucceeded; + options.showFailed = ShowFailed; + options.showIgnored = ShowIgnored; + options.showNotRunned = ShowNotRun; + options.nameFilter = FilterByName; + options.categories = GetSelectedCategories(); + return options; + } + } + +} diff --git a/Assets/UnityTestTools/Common/Editor/TestFilterSettings.cs.meta b/Assets/UnityTestTools/Common/Editor/TestFilterSettings.cs.meta new file mode 100644 index 0000000..9a7a0e3 --- /dev/null +++ b/Assets/UnityTestTools/Common/Editor/TestFilterSettings.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5a2d025e58bff433e963d0a4cd7599ef +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Common/Editor/icons.meta b/Assets/UnityTestTools/Common/Editor/icons.meta new file mode 100644 index 0000000..58c5248 --- /dev/null +++ b/Assets/UnityTestTools/Common/Editor/icons.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: e8bb6eae11352f44da0d6d8a8959b69e +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/Common/Editor/icons/failed.png b/Assets/UnityTestTools/Common/Editor/icons/failed.png new file mode 100644 index 0000000..7c0aba4 Binary files /dev/null and b/Assets/UnityTestTools/Common/Editor/icons/failed.png differ diff --git a/Assets/UnityTestTools/Common/Editor/icons/failed.png.meta b/Assets/UnityTestTools/Common/Editor/icons/failed.png.meta new file mode 100644 index 0000000..03673da --- /dev/null +++ b/Assets/UnityTestTools/Common/Editor/icons/failed.png.meta @@ -0,0 +1,35 @@ +fileFormatVersion: 2 +guid: 41488feb372865440b7c01773f04c0cf +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + textureType: 2 + buildTargetSettings: [] + userData: diff --git a/Assets/UnityTestTools/Common/Editor/icons/ignored.png b/Assets/UnityTestTools/Common/Editor/icons/ignored.png new file mode 100644 index 0000000..0190e59 Binary files /dev/null and b/Assets/UnityTestTools/Common/Editor/icons/ignored.png differ diff --git a/Assets/UnityTestTools/Common/Editor/icons/ignored.png.meta b/Assets/UnityTestTools/Common/Editor/icons/ignored.png.meta new file mode 100644 index 0000000..d14cc3b --- /dev/null +++ b/Assets/UnityTestTools/Common/Editor/icons/ignored.png.meta @@ -0,0 +1,35 @@ +fileFormatVersion: 2 +guid: 0076bfa6073f17546b3535ac1b456b0b +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + textureType: 2 + buildTargetSettings: [] + userData: diff --git a/Assets/UnityTestTools/Common/Editor/icons/inconclusive.png b/Assets/UnityTestTools/Common/Editor/icons/inconclusive.png new file mode 100644 index 0000000..df398dd Binary files /dev/null and b/Assets/UnityTestTools/Common/Editor/icons/inconclusive.png differ diff --git a/Assets/UnityTestTools/Common/Editor/icons/inconclusive.png.meta b/Assets/UnityTestTools/Common/Editor/icons/inconclusive.png.meta new file mode 100644 index 0000000..7c93bc4 --- /dev/null +++ b/Assets/UnityTestTools/Common/Editor/icons/inconclusive.png.meta @@ -0,0 +1,35 @@ +fileFormatVersion: 2 +guid: e28761099904678488cdddf7b6be2ceb +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + textureType: 2 + buildTargetSettings: [] + userData: diff --git a/Assets/UnityTestTools/Common/Editor/icons/normal.png b/Assets/UnityTestTools/Common/Editor/icons/normal.png new file mode 100644 index 0000000..6a04f79 Binary files /dev/null and b/Assets/UnityTestTools/Common/Editor/icons/normal.png differ diff --git a/Assets/UnityTestTools/Common/Editor/icons/normal.png.meta b/Assets/UnityTestTools/Common/Editor/icons/normal.png.meta new file mode 100644 index 0000000..34895eb --- /dev/null +++ b/Assets/UnityTestTools/Common/Editor/icons/normal.png.meta @@ -0,0 +1,35 @@ +fileFormatVersion: 2 +guid: a9f3c491f4c2f9f43ac33a27c16913dd +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + textureType: 2 + buildTargetSettings: [] + userData: diff --git a/Assets/UnityTestTools/Common/Editor/icons/passed.png b/Assets/UnityTestTools/Common/Editor/icons/passed.png new file mode 100644 index 0000000..1edd286 Binary files /dev/null and b/Assets/UnityTestTools/Common/Editor/icons/passed.png differ diff --git a/Assets/UnityTestTools/Common/Editor/icons/passed.png.meta b/Assets/UnityTestTools/Common/Editor/icons/passed.png.meta new file mode 100644 index 0000000..876d32d --- /dev/null +++ b/Assets/UnityTestTools/Common/Editor/icons/passed.png.meta @@ -0,0 +1,35 @@ +fileFormatVersion: 2 +guid: 31f7928179ee46d4690d274579efb037 +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + textureType: 2 + buildTargetSettings: [] + userData: diff --git a/Assets/UnityTestTools/Common/Editor/icons/stopwatch.png b/Assets/UnityTestTools/Common/Editor/icons/stopwatch.png new file mode 100644 index 0000000..ac5721c Binary files /dev/null and b/Assets/UnityTestTools/Common/Editor/icons/stopwatch.png differ diff --git a/Assets/UnityTestTools/Common/Editor/icons/stopwatch.png.meta b/Assets/UnityTestTools/Common/Editor/icons/stopwatch.png.meta new file mode 100644 index 0000000..f39adad --- /dev/null +++ b/Assets/UnityTestTools/Common/Editor/icons/stopwatch.png.meta @@ -0,0 +1,35 @@ +fileFormatVersion: 2 +guid: f73f95ae19d51af47ad56044f2779aa1 +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + textureType: 2 + buildTargetSettings: [] + userData: diff --git a/Assets/UnityTestTools/Common/ITestResult.cs b/Assets/UnityTestTools/Common/ITestResult.cs new file mode 100644 index 0000000..13f5fc3 --- /dev/null +++ b/Assets/UnityTestTools/Common/ITestResult.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityTest; + +public interface ITestResult +{ + TestResultState ResultState { get; } + + string Message { get; } + + string Logs { get; } + + bool Executed { get; } + + string Name { get; } + + string FullName { get; } + + string Id { get; } + + bool IsSuccess { get; } + + double Duration { get; } + + string StackTrace { get; } + + bool IsIgnored { get; } +} diff --git a/Assets/UnityTestTools/Common/ITestResult.cs.meta b/Assets/UnityTestTools/Common/ITestResult.cs.meta new file mode 100644 index 0000000..4864197 --- /dev/null +++ b/Assets/UnityTestTools/Common/ITestResult.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d1e4e2c4d00b3f2469494fc0f67cdeae +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Common/Settings.meta b/Assets/UnityTestTools/Common/Settings.meta new file mode 100644 index 0000000..fc16d88 --- /dev/null +++ b/Assets/UnityTestTools/Common/Settings.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: afa990d00eab88b43bfc9266f88e6960 +folderAsset: yes +timeCreated: 1473684316 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityTestTools/Common/Settings/IntegrationTestsRunnerSettings.asset b/Assets/UnityTestTools/Common/Settings/IntegrationTestsRunnerSettings.asset new file mode 100644 index 0000000..13210eb Binary files /dev/null and b/Assets/UnityTestTools/Common/Settings/IntegrationTestsRunnerSettings.asset differ diff --git a/Assets/UnityTestTools/Common/Settings/IntegrationTestsRunnerSettings.asset.meta b/Assets/UnityTestTools/Common/Settings/IntegrationTestsRunnerSettings.asset.meta new file mode 100644 index 0000000..a174d0e --- /dev/null +++ b/Assets/UnityTestTools/Common/Settings/IntegrationTestsRunnerSettings.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 852a0f64aaf37c146bc14306875d0a25 +timeCreated: 1473684316 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityTestTools/Common/TestResultState.cs b/Assets/UnityTestTools/Common/TestResultState.cs new file mode 100644 index 0000000..3dc4eb8 --- /dev/null +++ b/Assets/UnityTestTools/Common/TestResultState.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace UnityTest +{ + public enum TestResultState : byte + { + Inconclusive = 0, + + /// + /// The test was not runnable. + /// + NotRunnable = 1, + + /// + /// The test has been skipped. + /// + Skipped = 2, + + /// + /// The test has been ignored. + /// + Ignored = 3, + + /// + /// The test succeeded + /// + Success = 4, + + /// + /// The test failed + /// + Failure = 5, + + /// + /// The test encountered an unexpected exception + /// + Error = 6, + + /// + /// The test was cancelled by the user + /// + Cancelled = 7 + } +} diff --git a/Assets/UnityTestTools/Common/TestResultState.cs.meta b/Assets/UnityTestTools/Common/TestResultState.cs.meta new file mode 100644 index 0000000..e1576c7 --- /dev/null +++ b/Assets/UnityTestTools/Common/TestResultState.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: da3ca54ee4cce064989d27165f3081fb +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/Documentation.url b/Assets/UnityTestTools/Documentation.url new file mode 100644 index 0000000..980b585 --- /dev/null +++ b/Assets/UnityTestTools/Documentation.url @@ -0,0 +1,3 @@ +[InternetShortcut] +URL=https://bitbucket.org/Unity-Technologies/unitytesttools/wiki +IconIndex=0 \ No newline at end of file diff --git a/Assets/UnityTestTools/Documentation.url.meta b/Assets/UnityTestTools/Documentation.url.meta new file mode 100644 index 0000000..b5db496 --- /dev/null +++ b/Assets/UnityTestTools/Documentation.url.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 28f1b62e1364e5a4e88f7bb94dbcf183 +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework.meta b/Assets/UnityTestTools/IntegrationTestsFramework.meta new file mode 100644 index 0000000..da22872 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 241054a0fe63fbb4bb51609fce9b3112 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner.meta new file mode 100644 index 0000000..c65a67d --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: da93545c3ab1aa043bcfb22281b1f66c +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/DTOFormatter.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/DTOFormatter.cs new file mode 100644 index 0000000..653666d --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/DTOFormatter.cs @@ -0,0 +1,146 @@ +using System; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using UnityEngine; + +namespace UnityTest +{ + + public class DTOFormatter { + + private interface ITransferInterface + { + void Transfer(ref ResultDTO.MessageType val); + void Transfer(ref TestResultState val); + void Transfer(ref byte val); + void Transfer(ref bool val); + void Transfer(ref int val); + void Transfer(ref float val); + void Transfer(ref double val); + void Transfer(ref string val); + } + + private class Writer : ITransferInterface + { + private readonly Stream _stream; + public Writer(Stream stream) { _stream = stream; } + + private void WriteConvertedNumber(byte[] bytes) + { + if(BitConverter.IsLittleEndian) + Array.Reverse(bytes); + _stream.Write(bytes, 0, bytes.Length); + } + + public void Transfer(ref ResultDTO.MessageType val) { _stream.WriteByte((byte)val); } + public void Transfer(ref TestResultState val) { _stream.WriteByte((byte)val); } + public void Transfer(ref byte val) { _stream.WriteByte(val); } + public void Transfer(ref bool val) { _stream.WriteByte((byte)(val ? 0x01 : 0x00)); } + public void Transfer(ref int val) { WriteConvertedNumber(BitConverter.GetBytes(val)); } + public void Transfer(ref float val) { WriteConvertedNumber(BitConverter.GetBytes(val)); } + public void Transfer(ref double val) { WriteConvertedNumber(BitConverter.GetBytes(val)); } + + public void Transfer(ref string val) + { + var bytes = Encoding.BigEndianUnicode.GetBytes(val); + int length = bytes.Length; + Transfer(ref length); + _stream.Write(bytes, 0, bytes.Length); + } + } + + private class Reader : ITransferInterface + { + private readonly Stream _stream; + public Reader(Stream stream) { _stream = stream; } + + private byte[] ReadConvertedNumber(int size) + { + byte[] buffer = new byte[size]; + _stream.Read (buffer, 0, buffer.Length); + if(BitConverter.IsLittleEndian) + Array.Reverse(buffer); + return buffer; + } + + public void Transfer(ref ResultDTO.MessageType val) { val = (ResultDTO.MessageType)_stream.ReadByte(); } + public void Transfer(ref TestResultState val) { val = (TestResultState)_stream.ReadByte(); } + public void Transfer(ref byte val) { val = (byte)_stream.ReadByte(); } + public void Transfer(ref bool val) { val = (_stream.ReadByte() != 0); } + public void Transfer(ref int val) { val = BitConverter.ToInt32(ReadConvertedNumber(4), 0); } + public void Transfer(ref float val) { val = BitConverter.ToSingle(ReadConvertedNumber(4), 0); } + public void Transfer(ref double val) { val = BitConverter.ToDouble(ReadConvertedNumber(8), 0); } + + public void Transfer(ref string val) + { + int length = 0; + Transfer (ref length); + var bytes = new byte[length]; + int remain = length; + int index = 0; + do { + int bytesRead = _stream.Read(bytes, index, remain); + remain -= bytesRead; + index += bytesRead; + } while (remain > 0); +#if !UNITY_WSA + val = Encoding.BigEndianUnicode.GetString(bytes); +#endif + } + } + + private void Transfer(ResultDTO dto, ITransferInterface transfer) + { + transfer.Transfer(ref dto.messageType); + + transfer.Transfer(ref dto.levelCount); + transfer.Transfer(ref dto.loadedLevel); + transfer.Transfer(ref dto.loadedLevelName); + + if(dto.messageType == ResultDTO.MessageType.Ping + || dto.messageType == ResultDTO.MessageType.RunStarted + || dto.messageType == ResultDTO.MessageType.RunFinished + || dto.messageType == ResultDTO.MessageType.RunInterrupted + || dto.messageType == ResultDTO.MessageType.AllScenesFinished) + return; + + transfer.Transfer(ref dto.testName); + transfer.Transfer(ref dto.testTimeout); + + if(dto.messageType == ResultDTO.MessageType.TestStarted) + return; + + if(transfer is Reader) + dto.testResult = new SerializableTestResult(); + SerializableTestResult str = (SerializableTestResult)dto.testResult; + + transfer.Transfer(ref str.resultState); + transfer.Transfer(ref str.message); + transfer.Transfer(ref str.executed); + transfer.Transfer(ref str.name); + transfer.Transfer(ref str.fullName); + transfer.Transfer(ref str.id); + transfer.Transfer(ref str.isSuccess); + transfer.Transfer(ref str.duration); + transfer.Transfer(ref str.stackTrace); + } + + public void Serialize (Stream stream, ResultDTO dto) + { + Transfer(dto, new Writer(stream)); + } + + public object Deserialize (Stream stream) + { +#if !UNITY_WSA + var result = (ResultDTO)FormatterServices.GetSafeUninitializedObject(typeof(ResultDTO)); + Transfer (result, new Reader(stream)); + return result; +#else + return null; +#endif + } + } + +} \ No newline at end of file diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/DTOFormatter.cs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/DTOFormatter.cs.meta new file mode 100644 index 0000000..f83bde0 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/DTOFormatter.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7ae2470508a854b1c9df5375d03f8f58 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor.meta new file mode 100644 index 0000000..bd38839 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: caee08596a5965747b8edfde19e2f873 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Batch.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Batch.cs new file mode 100644 index 0000000..1b29f77 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Batch.cs @@ -0,0 +1,200 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using UnityEditor; +using UnityEditorInternal; +using UnityEngine; +using UnityTest.IntegrationTests; +using UnityEditor.SceneManagement; + +namespace UnityTest +{ + public static partial class Batch + { + const string k_ResultFilePathParam = "-resultFilePath="; + private const string k_TestScenesParam = "-testscenes="; + private const string k_OtherBuildScenesParam = "-includeBuildScenes="; + const string k_TargetPlatformParam = "-targetPlatform="; + const string k_ResultFileDirParam = "-resultsFileDirectory="; + + public static int returnCodeTestsOk = 0; + public static int returnCodeTestsFailed = 2; + public static int returnCodeRunError = 3; + + public static void RunIntegrationTests() + { + var targetPlatform = GetTargetPlatform(); + var otherBuildScenes = GetSceneListFromParam (k_OtherBuildScenesParam); + + var testScenes = GetSceneListFromParam(k_TestScenesParam); + if (testScenes.Count == 0) + testScenes = FindTestScenesInProject(); + + RunIntegrationTests(targetPlatform, testScenes, otherBuildScenes); + } + + public static void RunIntegrationTests(BuildTarget ? targetPlatform) + { + var sceneList = FindTestScenesInProject(); + RunIntegrationTests(targetPlatform, sceneList, new List()); + } + + + public static void RunIntegrationTests(BuildTarget? targetPlatform, List testScenes, List otherBuildScenes) + { + if (targetPlatform.HasValue) + BuildAndRun(targetPlatform.Value, testScenes, otherBuildScenes); + else + RunInEditor(testScenes, otherBuildScenes); + } + + private static void BuildAndRun(BuildTarget target, List testScenes, List otherBuildScenes) + { + var resultFilePath = GetParameterArgument(k_ResultFileDirParam); + + const int port = 0; + var ipList = TestRunnerConfigurator.GetAvailableNetworkIPs(); + + var config = new PlatformRunnerConfiguration + { + buildTarget = target, + buildScenes = otherBuildScenes, + testScenes = testScenes, + projectName = "IntegrationTests", + resultsDir = resultFilePath, + sendResultsOverNetwork = InternalEditorUtility.inBatchMode, + ipList = ipList, + port = port + }; + + if (Application.isWebPlayer) + { + config.sendResultsOverNetwork = false; + Debug.Log("You can't use WebPlayer as active platform for running integration tests. Switching to Standalone"); + EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTarget.StandaloneWindows); + } + + PlatformRunner.BuildAndRunInPlayer(config); + } + + private static void RunInEditor(List testScenes, List otherBuildScenes) + { + CheckActiveBuildTarget(); + + NetworkResultsReceiver.StopReceiver(); + if (testScenes == null || testScenes.Count == 0) + { + Debug.Log("No test scenes on the list"); + EditorApplication.Exit(returnCodeRunError); + return; + } + + string previousScenesXml = ""; + var serializer = new System.Xml.Serialization.XmlSerializer(typeof(EditorBuildSettingsScene[])); + using(StringWriter textWriter = new StringWriter()) + { + serializer.Serialize(textWriter, EditorBuildSettings.scenes); + previousScenesXml = textWriter.ToString(); + } + + EditorBuildSettings.scenes = (testScenes.Concat(otherBuildScenes).ToList()).Select(s => new EditorBuildSettingsScene(s, true)).ToArray(); + EditorSceneManager.OpenScene(testScenes.First()); + GuiHelper.SetConsoleErrorPause(false); + + var config = new PlatformRunnerConfiguration + { + resultsDir = GetParameterArgument(k_ResultFileDirParam), + ipList = TestRunnerConfigurator.GetAvailableNetworkIPs(), + port = PlatformRunnerConfiguration.TryToGetFreePort(), + runInEditor = true + }; + + var settings = new PlayerSettingConfigurator(true); + settings.AddConfigurationFile(TestRunnerConfigurator.integrationTestsNetwork, string.Join("\n", config.GetConnectionIPs())); + settings.AddConfigurationFile(TestRunnerConfigurator.testScenesToRun, string.Join ("\n", testScenes.ToArray())); + settings.AddConfigurationFile(TestRunnerConfigurator.previousScenes, previousScenesXml); + + NetworkResultsReceiver.StartReceiver(config); + + EditorApplication.isPlaying = true; + } + + private static string GetParameterArgument(string parameterName) + { + foreach (var arg in Environment.GetCommandLineArgs()) + { + if (arg.ToLower().StartsWith(parameterName.ToLower())) + { + return arg.Substring(parameterName.Length); + } + } + return null; + } + + static void CheckActiveBuildTarget() + { + var notSupportedPlatforms = new[] { "MetroPlayer", "WebPlayer", "WebPlayerStreamed" }; + if (notSupportedPlatforms.Contains(EditorUserBuildSettings.activeBuildTarget.ToString())) + { + Debug.Log("activeBuildTarget can not be " + + EditorUserBuildSettings.activeBuildTarget + + " use buildTarget parameter to open Unity."); + } + } + + private static BuildTarget ? GetTargetPlatform() + { + string platformString = null; + BuildTarget buildTarget; + foreach (var arg in Environment.GetCommandLineArgs()) + { + if (arg.ToLower().StartsWith(k_TargetPlatformParam.ToLower())) + { + platformString = arg.Substring(k_ResultFilePathParam.Length); + break; + } + } + try + { + if (platformString == null) return null; + buildTarget = (BuildTarget)Enum.Parse(typeof(BuildTarget), platformString); + } + catch + { + return null; + } + return buildTarget; + } + + private static List FindTestScenesInProject() + { + var integrationTestScenePattern = "*Test?.unity"; + return Directory.GetFiles("Assets", integrationTestScenePattern, SearchOption.AllDirectories).ToList(); + } + + private static List GetSceneListFromParam(string param) + { + var sceneList = new List(); + foreach (var arg in Environment.GetCommandLineArgs()) + { + if (arg.ToLower().StartsWith(param.ToLower())) + { + var scenesFromParam = arg.Substring(param.Length).Split(','); + foreach (var scene in scenesFromParam) + { + var sceneName = scene; + if (!sceneName.EndsWith(".unity")) + sceneName += ".unity"; + var foundScenes = Directory.GetFiles(Directory.GetCurrentDirectory(), sceneName, SearchOption.AllDirectories); + if (foundScenes.Length == 1) + sceneList.Add(foundScenes[0].Substring(Directory.GetCurrentDirectory().Length + 1)); + else + Debug.Log(sceneName + " not found or multiple entries found"); + } + } + } + return sceneList.Where(s => !string.IsNullOrEmpty(s)).Distinct().ToList(); + } + } +} diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Batch.cs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Batch.cs.meta new file mode 100644 index 0000000..248a6ce --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Batch.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 29d4fb050362c5b43aea52342045543a +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/EditorReferencesUtil.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/EditorReferencesUtil.cs new file mode 100644 index 0000000..3d762b8 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/EditorReferencesUtil.cs @@ -0,0 +1,102 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using UnityEditor; +using UnityEngine; +using Object = UnityEngine.Object; + +namespace UnityTest +{ + public static class EditorReferencesUtil + { + + public static List FindScenesWhichContainAsset(string file) + { + string assetPath = GetAssetPathFromFileNameAndExtension (file); + Object cur = AssetDatabase.LoadAssetAtPath(assetPath, typeof(Object)); + return AllScenes.Where(a => ADependsOnB(a, cur)).ToList(); + } + + private static string CleanPathSeparators(string s) + { + const string forwardSlash = "/"; + const string backSlash = "\\"; + return s.Replace(backSlash, forwardSlash); + } + + private static string GetRelativeAssetPathFromFullPath(string fullPath) + { + fullPath = CleanPathSeparators(fullPath); + if (fullPath.Contains(Application.dataPath)) + { + return fullPath.Replace(Application.dataPath, "Assets"); + } + Debug.LogWarning("Path does not point to a location within Assets: " + fullPath); + return null; + } + + private static string GetAssetPathFromFileNameAndExtension(string assetName) + { + string[] assets = AssetDatabase.FindAssets (Path.GetFileNameWithoutExtension (assetName)); + string assetPath = null; + + foreach (string guid in assets) { + string relativePath = AssetDatabase.GUIDToAssetPath (guid); + + if (Path.GetFileName (relativePath) == Path.GetFileName (assetName)) + assetPath = relativePath; + } + + return assetPath; + } + + private static List DirSearch(DirectoryInfo d, string searchFor) + { + List founditems = d.GetFiles(searchFor).ToList(); + + // Add (by recursing) subdirectory items. + DirectoryInfo[] dis = d.GetDirectories(); + foreach (DirectoryInfo di in dis) + founditems.AddRange(DirSearch(di, searchFor)); + + return (founditems); + } + + private static List AllScenes + { + get + { + // get every single one of the files in the Assets folder. + List files = DirSearch(new DirectoryInfo(Application.dataPath), "*.unity"); + + // now make them all into Asset references. + List assetRefs = new List(); + + foreach (FileInfo fi in files) + { + if (fi.Name.StartsWith(".")) + continue; // Unity ignores dotfiles. + assetRefs.Add(AssetDatabase.LoadMainAssetAtPath(GetRelativeAssetPathFromFullPath(fi.FullName))); + } + return assetRefs; + } + } + + private static bool ADependsOnB(Object obj, Object selectedObj) + { + if (selectedObj == null) return false; + + //optionally, exclude self. + if (selectedObj == obj) return false; + + Object[] dependencies = EditorUtility.CollectDependencies(new Object[1] { obj }); + if (dependencies.Length < 2) return false; // if there's only one, it's us. + + foreach (Object dep in dependencies) + if (dep == selectedObj) + return true; + return false; + } + } +} \ No newline at end of file diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/EditorReferencesUtil.cs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/EditorReferencesUtil.cs.meta new file mode 100644 index 0000000..78bcfab --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/EditorReferencesUtil.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: aad501c968b324cf3a8d1c52eb09ca04 +timeCreated: 1437322927 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/GuiHelper.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/GuiHelper.cs new file mode 100644 index 0000000..b8f461a --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/GuiHelper.cs @@ -0,0 +1,26 @@ +using System; +using System.Reflection; +using UnityEditor; + +namespace UnityTest +{ + public static class GuiHelper + { + public static bool GetConsoleErrorPause() + { + Assembly assembly = Assembly.GetAssembly(typeof(SceneView)); + Type type = assembly.GetType("UnityEditorInternal.LogEntries"); + PropertyInfo method = type.GetProperty("consoleFlags"); + var result = (int)method.GetValue(new object(), new object[] { }); + return (result & (1 << 2)) != 0; + } + + public static void SetConsoleErrorPause(bool b) + { + Assembly assembly = Assembly.GetAssembly(typeof(SceneView)); + Type type = assembly.GetType("UnityEditorInternal.LogEntries"); + MethodInfo method = type.GetMethod("SetConsoleFlag"); + method.Invoke(new object(), new object[] { 1 << 2, b }); + } + } +} diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/GuiHelper.cs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/GuiHelper.cs.meta new file mode 100644 index 0000000..596d39f --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/GuiHelper.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b0b95014154ef554485afc9c0316556d +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/IntegrationTestsHierarchyAnnotation.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/IntegrationTestsHierarchyAnnotation.cs new file mode 100644 index 0000000..4aa5dc4 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/IntegrationTestsHierarchyAnnotation.cs @@ -0,0 +1,44 @@ +using UnityEngine; +using System.Collections; +using UnityEditor; + +namespace UnityTest +{ + + [InitializeOnLoad] + public class IntegrationTestsHierarchyAnnotation { + + static IntegrationTestsHierarchyAnnotation() + { + EditorApplication.hierarchyWindowItemOnGUI += DoAnnotationGUI; + } + + public static void DoAnnotationGUI(int id, Rect rect) + { + var obj = EditorUtility.InstanceIDToObject(id) as GameObject; + if(!obj) return; + + var tc = obj.GetComponent(); + if(!tc) return; + + if (!EditorApplication.isPlayingOrWillChangePlaymode + && rect.Contains(Event.current.mousePosition) + && Event.current.type == EventType.MouseDown + && Event.current.button == 1) + { + IntegrationTestRendererBase.DrawContextMenu(tc); + Event.current.Use (); + } + + EditorGUIUtility.SetIconSize(new Vector2(15, 15)); + var result = IntegrationTestsRunnerWindow.GetResultForTest(tc); + if (result != null) + { + var icon = result.Executed ? IntegrationTestRendererBase.GetIconForResult(result.resultType) : Icons.UnknownImg; + EditorGUI.LabelField(new Rect(rect.xMax - 18, rect.yMin - 2, rect.width, rect.height), new GUIContent(icon)); + } + EditorGUIUtility.SetIconSize(Vector2.zero); + } + } + +} \ No newline at end of file diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/IntegrationTestsHierarchyAnnotation.cs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/IntegrationTestsHierarchyAnnotation.cs.meta new file mode 100644 index 0000000..4154bdc --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/IntegrationTestsHierarchyAnnotation.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 219cdb080b08741948fc5deb8c7d47f0 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/IntegrationTestsRunnerSettings.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/IntegrationTestsRunnerSettings.cs new file mode 100644 index 0000000..1e8e466 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/IntegrationTestsRunnerSettings.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; + +namespace UnityTest +{ + public class IntegrationTestsRunnerSettings : ProjectSettingsBase + { + public bool blockUIWhenRunning = true; + public bool pauseOnTestFailure; + + public void ToggleBlockUIWhenRunning () + { + blockUIWhenRunning = !blockUIWhenRunning; + Save (); + } + + public void TogglePauseOnTestFailure() + { + pauseOnTestFailure = !pauseOnTestFailure; + Save (); + } + } +} diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/IntegrationTestsRunnerSettings.cs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/IntegrationTestsRunnerSettings.cs.meta new file mode 100644 index 0000000..d18086a --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/IntegrationTestsRunnerSettings.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5d01dc4c8f278da489d7d54c83f19cb9 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/IntegrationTestsRunnerWindow.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/IntegrationTestsRunnerWindow.cs new file mode 100644 index 0000000..2a5ed8d --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/IntegrationTestsRunnerWindow.cs @@ -0,0 +1,590 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using UnityEditor; +using UnityEngine; +using UnityTest.IntegrationTestRunner; +using UnityEngine.SceneManagement; + +namespace UnityTest +{ + [Serializable] + public class IntegrationTestsRunnerWindow : EditorWindow, IHasCustomMenu + { + #region GUI Contents + private readonly GUIContent m_GUICreateNewTest = new GUIContent("Create", "Create new test"); + private readonly GUIContent m_GUIRunSelectedTests = new GUIContent("Run Selected", "Run selected test(s)"); + private readonly GUIContent m_GUIRunAllTests = new GUIContent("Run All", "Run all tests"); + private readonly GUIContent m_GUIBlockUI = new GUIContent("Block UI when running", "Block UI when running tests"); + private readonly GUIContent m_GUIPauseOnFailure = new GUIContent("Pause on test failure"); + #endregion + + #region runner steerign vars + private static IntegrationTestsRunnerWindow s_Instance; + [SerializeField] private List m_TestsToRun; + [SerializeField] private List m_DynamicTestsToRun; + [SerializeField] private bool m_ReadyToRun; + private bool m_IsBuilding; + public static bool selectedInHierarchy; + private float m_HorizontalSplitBarPosition = 200; + private Vector2 m_TestInfoScroll, m_TestListScroll; + private IntegrationTestRendererBase[] m_TestLines; + private string m_CurrectSceneName; + private TestFilterSettings m_FilterSettings; + + Vector2 m_resultTextSize; + string m_resultText; + GameObject m_lastSelectedGO; + int m_resultTestMaxLength = 15000; + + [SerializeField] private GameObject m_SelectedLine; + [SerializeField] private List m_ResultList = new List(); + [SerializeField] private List m_FoldMarkers = new List(); + + private IntegrationTestsRunnerSettings m_Settings; + + #endregion + + + static IntegrationTestsRunnerWindow() + { + InitBackgroundRunners(); + } + + private static void InitBackgroundRunners() + { + EditorApplication.hierarchyWindowItemOnGUI -= OnHierarchyWindowItemDraw; + EditorApplication.hierarchyWindowItemOnGUI += OnHierarchyWindowItemDraw; + EditorApplication.hierarchyWindowChanged -= OnHierarchyChangeUpdate; + EditorApplication.hierarchyWindowChanged += OnHierarchyChangeUpdate; + EditorApplication.update -= BackgroundSceneChangeWatch; + EditorApplication.update += BackgroundSceneChangeWatch; + EditorApplication.playmodeStateChanged -= OnPlaymodeStateChanged; + EditorApplication.playmodeStateChanged += OnPlaymodeStateChanged; + } + + private static void OnPlaymodeStateChanged() + { + if (s_Instance && EditorApplication.isPlaying == EditorApplication.isPlayingOrWillChangePlaymode) + s_Instance.RebuildTestList(); + } + + public void OnDestroy() + { + EditorApplication.hierarchyWindowItemOnGUI -= OnHierarchyWindowItemDraw; + EditorApplication.update -= BackgroundSceneChangeWatch; + EditorApplication.hierarchyWindowChanged -= OnHierarchyChangeUpdate; + EditorApplication.playmodeStateChanged -= OnPlaymodeStateChanged; + + TestComponent.DestroyAllDynamicTests(); + } + + private static void BackgroundSceneChangeWatch() + { + if (!s_Instance) return; + var currentScene = SceneManager.GetActiveScene().path; + if (s_Instance.m_CurrectSceneName != null && s_Instance.m_CurrectSceneName == currentScene) return; + if (EditorApplication.isPlayingOrWillChangePlaymode) return; + TestComponent.DestroyAllDynamicTests(); + s_Instance.m_CurrectSceneName = currentScene; + s_Instance.m_ResultList.Clear(); + s_Instance.RebuildTestList(); + } + + public void OnEnable() + { + titleContent = new GUIContent("Integration Tests"); + s_Instance = this; + + m_Settings = ProjectSettingsBase.Load(); + m_FilterSettings = new TestFilterSettings("UnityTest.IntegrationTestsRunnerWindow"); + + InitBackgroundRunners(); + if (!EditorApplication.isPlayingOrWillChangePlaymode && !m_ReadyToRun) RebuildTestList(); + } + + public void OnSelectionChange() + { + if (EditorApplication.isPlayingOrWillChangePlaymode + || Selection.objects == null + || Selection.objects.Length == 0) return; + + if (Selection.gameObjects.Length == 1) + { + var go = Selection.gameObjects.Single(); + var temp = go.transform; + while (temp != null) + { + var tc = temp.GetComponent(); + if (tc != null) break; + temp = temp.parent; + } + + if (temp != null) + { + SelectInHierarchy(temp.gameObject); + Selection.activeGameObject = temp.gameObject; + m_SelectedLine = temp.gameObject; + } + } + } + + public static void OnHierarchyChangeUpdate() + { + if (!s_Instance || s_Instance.m_TestLines == null || EditorApplication.isPlayingOrWillChangePlaymode) return; + + // create a test runner if it doesn't exist + TestRunner.GetTestRunner(); + + // make tests are not places under a go that is not a test itself + foreach (var test in TestComponent.FindAllTestsOnScene()) + { + if (test.gameObject.transform.parent != null && test.gameObject.transform.parent.gameObject.GetComponent() == null) + { + test.gameObject.transform.parent = null; + Debug.LogWarning("Tests need to be on top of the hierarchy or directly under another test."); + } + } + if (selectedInHierarchy) selectedInHierarchy = false; + else s_Instance.RebuildTestList(); + } + + public static TestResult GetResultForTest(TestComponent tc) + { + if(!s_Instance) return new TestResult(tc); + return s_Instance.m_ResultList.FirstOrDefault(r => r.GameObject == tc.gameObject); + } + + public static void OnHierarchyWindowItemDraw(int id, Rect rect) + { + var o = EditorUtility.InstanceIDToObject(id); + if (o is GameObject) + { + var go = o as GameObject; + + if (Event.current.type == EventType.MouseDown + && Event.current.button == 0 + && rect.Contains(Event.current.mousePosition)) + { + var temp = go.transform; + while (temp != null) + { + var c = temp.GetComponent(); + if (c != null) break; + temp = temp.parent; + } + if (temp != null) SelectInHierarchy(temp.gameObject); + } + } + } + + private static void SelectInHierarchy(GameObject gameObject) + { + if (!s_Instance) return; + if (gameObject == s_Instance.m_SelectedLine && gameObject.activeInHierarchy) return; + if (EditorApplication.isPlayingOrWillChangePlaymode) return; + if (!gameObject.activeSelf) + { + selectedInHierarchy = true; + gameObject.SetActive(true); + } + + var tests = TestComponent.FindAllTestsOnScene(); + var skipList = gameObject.GetComponentsInChildren(typeof(TestComponent), true).ToList(); + tests.RemoveAll(skipList.Contains); + foreach (var test in tests) + { + var enable = test.GetComponentsInChildren(typeof(TestComponent), true).Any(c => c.gameObject == gameObject); + if (test.gameObject.activeSelf != enable) test.gameObject.SetActive(enable); + } + } + + private void RunTests(IList tests) + { + if (!tests.Any() || EditorApplication.isCompiling || EditorApplication.isPlayingOrWillChangePlaymode) + return; + FocusWindowIfItsOpen(GetType()); + + var testComponents = tests.Where(t => t is TestComponent).Cast().ToList(); + var dynaminTests = testComponents.Where(t => t.dynamic).ToList(); + m_DynamicTestsToRun = dynaminTests.Select(c => c.dynamicTypeName).ToList(); + testComponents.RemoveAll(dynaminTests.Contains); + + m_TestsToRun = testComponents.Select( tc => tc.gameObject ).ToList(); + + m_ReadyToRun = true; + TestComponent.DisableAllTests(); + + EditorApplication.isPlaying = true; + } + + public void Update() + { + if (m_ReadyToRun && EditorApplication.isPlaying) + { + m_ReadyToRun = false; + var testRunner = TestRunner.GetTestRunner(); + testRunner.TestRunnerCallback.Add(new RunnerCallback(this)); + var testComponents = m_TestsToRun.Select(go => go.GetComponent()).ToList(); + testRunner.InitRunner(testComponents, m_DynamicTestsToRun); + } + } + + private void RebuildTestList() + { + m_TestLines = null; + if (!TestComponent.AnyTestsOnScene() + && !TestComponent.AnyDynamicTestForCurrentScene()) return; + + if (!EditorApplication.isPlayingOrWillChangePlaymode) + { + var dynamicTestsOnScene = TestComponent.FindAllDynamicTestsOnScene(); + var dynamicTestTypes = TestComponent.GetTypesWithHelpAttribute(SceneManager.GetActiveScene().path); + + foreach (var dynamicTestType in dynamicTestTypes) + { + var existingTests = dynamicTestsOnScene.Where(component => component.dynamicTypeName == dynamicTestType.AssemblyQualifiedName); + if (existingTests.Any()) + { + var testComponent = existingTests.Single(); + foreach (var c in testComponent.gameObject.GetComponents()) + { + var type = Type.GetType(testComponent.dynamicTypeName); + if (c is TestComponent || c is Transform || type.IsInstanceOfType(c)) continue; + DestroyImmediate(c); + } + dynamicTestsOnScene.Remove(existingTests.Single()); + continue; + } + TestComponent.CreateDynamicTest(dynamicTestType); + } + + foreach (var testComponent in dynamicTestsOnScene) + DestroyImmediate(testComponent.gameObject); + } + + var topTestList = TestComponent.FindAllTopTestsOnScene(); + + var newResultList = new List(); + m_TestLines = ParseTestList(topTestList, newResultList); + + var oldDynamicResults = m_ResultList.Where(result => result.dynamicTest); + foreach (var oldResult in m_ResultList) + { + var result = newResultList.Find(r => r.Id == oldResult.Id); + if (result == null) continue; + result.Update(oldResult); + } + newResultList.AddRange(oldDynamicResults.Where(r => !newResultList.Contains(r))); + m_ResultList = newResultList; + + IntegrationTestRendererBase.RunTest = RunTests; + IntegrationTestGroupLine.FoldMarkers = m_FoldMarkers; + IntegrationTestLine.Results = m_ResultList; + + m_FilterSettings.UpdateCounters(m_ResultList.Cast()); + + m_FoldMarkers.RemoveAll(o => o == null); + + selectedInHierarchy = true; + Repaint(); + } + + + private IntegrationTestRendererBase[] ParseTestList(List testList, List results) + { + var tempList = new List(); + foreach (var testObject in testList) + { + if (!testObject.IsTestGroup()) + { + var result = new TestResult(testObject); + if (results != null) + results.Add(result); + tempList.Add(new IntegrationTestLine(testObject.gameObject, result)); + continue; + } + var group = new IntegrationTestGroupLine(testObject.gameObject); + var children = testObject.gameObject.GetComponentsInChildren(typeof(TestComponent), true).Cast().ToList(); + children = children.Where(c => c.gameObject.transform.parent == testObject.gameObject.transform).ToList(); + group.AddChildren(ParseTestList(children, results)); + tempList.Add(group); + } + tempList.Sort(); + return tempList.ToArray(); + } + + public void OnGUI() + { + if (BuildPipeline.isBuildingPlayer) + { + m_IsBuilding = true; + } + else if (m_IsBuilding) + { + m_IsBuilding = false; + Repaint(); + } + + PrintHeadPanel(); + + EditorGUILayout.BeginVertical(Styles.testList); + m_TestListScroll = EditorGUILayout.BeginScrollView(m_TestListScroll); + bool repaint = PrintTestList(m_TestLines); + GUILayout.FlexibleSpace(); + EditorGUILayout.EndScrollView(); + EditorGUILayout.EndVertical(); + + RenderDetails(); + + if (repaint) Repaint(); + } + + public void PrintHeadPanel() + { + EditorGUILayout.BeginHorizontal(EditorStyles.toolbar); + EditorGUI.BeginDisabledGroup(EditorApplication.isPlayingOrWillChangePlaymode); + if (GUILayout.Button(m_GUIRunAllTests, EditorStyles.toolbarButton)) + { + RunTests(TestComponent.FindAllTestsOnScene().Cast().ToList()); + } + EditorGUI.BeginDisabledGroup(!Selection.gameObjects.Any (t => t.GetComponent(typeof(ITestComponent)))); + if (GUILayout.Button(m_GUIRunSelectedTests, EditorStyles.toolbarButton)) + { + RunTests(Selection.gameObjects.Select(t => t.GetComponent(typeof(TestComponent))).Cast().ToList()); + } + EditorGUI.EndDisabledGroup(); + if (GUILayout.Button(m_GUICreateNewTest, EditorStyles.toolbarButton)) + { + var test = TestComponent.CreateTest(); + if (Selection.gameObjects.Length == 1 + && Selection.activeGameObject != null + && Selection.activeGameObject.GetComponent()) + { + test.transform.parent = Selection.activeGameObject.transform.parent; + } + Selection.activeGameObject = test; + RebuildTestList(); + } + EditorGUI.EndDisabledGroup(); + + GUILayout.FlexibleSpace (); + + m_FilterSettings.OnGUI (); + + EditorGUILayout.EndHorizontal (); + } + + public void AddItemsToMenu(GenericMenu menu) + { + menu.AddItem(m_GUIBlockUI, m_Settings.blockUIWhenRunning, m_Settings.ToggleBlockUIWhenRunning); + menu.AddItem(m_GUIPauseOnFailure, m_Settings.pauseOnTestFailure, m_Settings.TogglePauseOnTestFailure); + } + + private bool PrintTestList(IntegrationTestRendererBase[] renderedLines) + { + if (renderedLines == null) return false; + + var filter = m_FilterSettings.BuildRenderingOptions(); + + bool repaint = false; + foreach (var renderedLine in renderedLines) + { + repaint |= renderedLine.Render(filter); + } + return repaint; + } + + private void RenderDetails() + { + var ctrlId = GUIUtility.GetControlID(FocusType.Passive); + + Rect rect = GUILayoutUtility.GetLastRect(); + rect.y = rect.height + rect.y - 1; + rect.height = 3; + + EditorGUIUtility.AddCursorRect(rect, MouseCursor.ResizeVertical); + var e = Event.current; + switch (e.type) + { + case EventType.MouseDown: + if (GUIUtility.hotControl == 0 && rect.Contains(e.mousePosition)) + GUIUtility.hotControl = ctrlId; + break; + case EventType.MouseDrag: + if (GUIUtility.hotControl == ctrlId) + { + m_HorizontalSplitBarPosition -= e.delta.y; + if (m_HorizontalSplitBarPosition < 20) m_HorizontalSplitBarPosition = 20; + Repaint(); + } + break; + case EventType.MouseUp: + if (GUIUtility.hotControl == ctrlId) + GUIUtility.hotControl = 0; + break; + } + + m_TestInfoScroll = EditorGUILayout.BeginScrollView(m_TestInfoScroll, GUILayout.MinHeight(m_HorizontalSplitBarPosition)); + + if (m_SelectedLine != null) + UpdateResultText(m_SelectedLine); + + EditorGUILayout.SelectableLabel(m_resultText, Styles.info, + GUILayout.ExpandHeight(true), + GUILayout.ExpandWidth(true), + GUILayout.MinWidth(m_resultTextSize.x), + GUILayout.MinHeight(m_resultTextSize.y)); + EditorGUILayout.EndScrollView(); + } + + private void UpdateResultText(GameObject go) + { + if(go == m_lastSelectedGO) return; + m_lastSelectedGO = go; + var result = m_ResultList.Find(r => r.GameObject == go); + if (result == null) + { + m_resultText = string.Empty; + m_resultTextSize = Styles.info.CalcSize(new GUIContent(string.Empty)); + return; + } + var sb = new StringBuilder(result.Name.Trim()); + if (!string.IsNullOrEmpty(result.messages)) + { + sb.Append("\n---\n"); + sb.Append(result.messages.Trim()); + } + if (!string.IsNullOrEmpty(result.stacktrace)) + { + sb.Append("\n---\n"); + sb.Append(result.stacktrace.Trim()); + } + if(sb.Length>m_resultTestMaxLength) + { + sb.Length = m_resultTestMaxLength; + sb.AppendFormat("...\n\n---MESSAGE TRUNCATED AT {0} CHARACTERS---", m_resultTestMaxLength); + } + m_resultText = sb.ToString().Trim(); + m_resultTextSize = Styles.info.CalcSize(new GUIContent(m_resultText)); + } + + public void OnInspectorUpdate() + { + if (focusedWindow != this) Repaint(); + } + + private void SetCurrentTest(TestComponent tc) + { + foreach (var line in m_TestLines) + line.SetCurrentTest(tc); + } + + class RunnerCallback : ITestRunnerCallback + { + private readonly IntegrationTestsRunnerWindow m_Window; + private int m_TestNumber; + private int m_CurrentTestNumber; + + private readonly bool m_ConsoleErrorOnPauseValue; + private readonly bool m_RunInBackground; + private TestComponent m_CurrentTest; + + public RunnerCallback(IntegrationTestsRunnerWindow window) + { + m_Window = window; + + m_ConsoleErrorOnPauseValue = GuiHelper.GetConsoleErrorPause(); + GuiHelper.SetConsoleErrorPause(false); + m_RunInBackground = PlayerSettings.runInBackground; + PlayerSettings.runInBackground = true; + } + + public void RunStarted(string platform, List testsToRun) + { + EditorApplication.update += OnEditorUpdate; + m_TestNumber = testsToRun.Count; + foreach (var test in testsToRun) + { + var result = m_Window.m_ResultList.Find(r => r.TestComponent == test); + if (result != null) result.Reset(); + } + } + + public void RunFinished(List testResults) + { + m_Window.SetCurrentTest(null); + m_CurrentTest = null; + EditorApplication.update -= OnEditorUpdate; + EditorApplication.isPlaying = false; + EditorUtility.ClearProgressBar(); + GuiHelper.SetConsoleErrorPause(m_ConsoleErrorOnPauseValue); + PlayerSettings.runInBackground = m_RunInBackground; + } + + public void AllScenesFinished() + { + + } + + public void TestStarted(TestResult test) + { + m_Window.SetCurrentTest(test.TestComponent); + m_CurrentTest = test.TestComponent; + } + + + public void TestFinished(TestResult test) + { + m_CurrentTestNumber++; + + var result = m_Window.m_ResultList.Find(r => r.Id == test.Id); + if (result != null) + result.Update(test); + else + m_Window.m_ResultList.Add(test); + + if(test.IsFailure && m_Window.m_Settings.pauseOnTestFailure) + { + EditorUtility.ClearProgressBar(); + EditorApplication.isPaused = true; + } + } + + public void TestRunInterrupted(List testsNotRun) + { + Debug.Log("Test run interrupted"); + RunFinished(new List()); + } + + private void OnEditorUpdate() + { + if(!EditorApplication.isPlaying) + { + TestRunInterrupted(null); + return; + } + + if (m_Window.m_Settings.blockUIWhenRunning + && m_CurrentTest != null + && !EditorApplication.isPaused + && EditorUtility.DisplayCancelableProgressBar("Integration Test Runner", + "Running " + m_CurrentTest.Name, + (float)m_CurrentTestNumber / m_TestNumber)) + { + TestRunInterrupted(null); + } + } + } + + [MenuItem("Unity Test Tools/Integration Test Runner %#&t")] + public static IntegrationTestsRunnerWindow ShowWindow() + { + var w = GetWindow(typeof(IntegrationTestsRunnerWindow)); + w.Show(); + return w as IntegrationTestsRunnerWindow; + } + } +} diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/IntegrationTestsRunnerWindow.cs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/IntegrationTestsRunnerWindow.cs.meta new file mode 100644 index 0000000..86b5775 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/IntegrationTestsRunnerWindow.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2c898357efb599944818326bb43ba879 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner.meta new file mode 100644 index 0000000..b7631ee --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: c44e9167d633ee94bb6e078238178308 +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/NetworkResultsReceiver.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/NetworkResultsReceiver.cs new file mode 100644 index 0000000..01ce886 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/NetworkResultsReceiver.cs @@ -0,0 +1,261 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Net.Sockets; +using UnityEditor; +using UnityEditorInternal; +using UnityEngine; + +namespace UnityTest +{ + [Serializable] + public class NetworkResultsReceiver : EditorWindow + { + public static NetworkResultsReceiver Instance; + + private string m_StatusLabel; + private TcpListener m_Listener; + + [SerializeField] + private PlatformRunnerConfiguration m_Configuration; + + private List m_TestResults = new List(); + + #region steering variables + private bool m_RunFinished; + private bool m_Repaint; + + private TimeSpan m_TestTimeout = TimeSpan.Zero; + private DateTime m_LastMessageReceived; + private bool m_Running; + + public TimeSpan ReceiveMessageTimeout = TimeSpan.FromSeconds(30); + private readonly TimeSpan m_InitialConnectionTimeout = TimeSpan.FromSeconds(300); + private bool m_TestFailed; + #endregion + + private void AcceptCallback(TcpClient client) + { + m_Repaint = true; + ResultDTO dto; + try + { + m_LastMessageReceived = DateTime.Now; + using (var stream = client.GetStream()) + { + var bf = new DTOFormatter(); + dto = (ResultDTO)bf.Deserialize(stream); + stream.Close(); + } + client.Close(); + } + catch (ObjectDisposedException e) + { + Debug.LogException(e); + m_StatusLabel = "Got disconnected"; + return; + } + catch (Exception e) + { + Debug.LogException(e); + return; + } + + switch (dto.messageType) + { + case ResultDTO.MessageType.TestStarted: + m_StatusLabel = dto.testName; + m_TestTimeout = TimeSpan.FromSeconds(dto.testTimeout); + break; + case ResultDTO.MessageType.TestFinished: + m_TestResults.Add(dto.testResult); + m_TestTimeout = TimeSpan.Zero; + if (dto.testResult.Executed && dto.testResult.ResultState != TestResultState.Ignored && !dto.testResult.IsSuccess) + m_TestFailed = true; + break; + case ResultDTO.MessageType.RunStarted: + m_TestResults = new List(); + m_StatusLabel = "Run started: " + dto.loadedLevelName; + break; + case ResultDTO.MessageType.RunFinished: + WriteResultsToLog(dto, m_TestResults); + if (!string.IsNullOrEmpty(m_Configuration.resultsDir)) + { + var platform = m_Configuration.runInEditor ? "Editor" : m_Configuration.buildTarget.ToString(); + var resultWriter = new XmlResultWriter(dto.loadedLevelName, platform, m_TestResults.ToArray()); + try + { + if (!Directory.Exists(m_Configuration.resultsDir)) + { + Directory.CreateDirectory(m_Configuration.resultsDir); + } + var filePath = Path.Combine(m_Configuration.resultsDir, dto.loadedLevelName + ".xml"); + File.WriteAllText(filePath, resultWriter.GetTestResult()); + } + catch (Exception e) + { + Debug.LogException(e); + } + } + break; + case ResultDTO.MessageType.AllScenesFinished: + m_Running = false; + m_RunFinished = true; + break; + case ResultDTO.MessageType.Ping: + break; + } + } + + private void WriteResultsToLog(ResultDTO dto, List list) + { + string result = "Run finished for: " + dto.loadedLevelName; + var failCount = list.Count(t => t.Executed && !t.IsSuccess); + if (failCount == 0) + result += "\nAll tests passed"; + else + result += "\n" + failCount + " tests failed"; + + if (failCount == 0) + Debug.Log(result); + else + Debug.LogWarning(result); + } + + public void Update() + { + if (EditorApplication.isCompiling + && m_Listener != null) + { + m_Running = false; + m_Listener.Stop(); + return; + } + + if (m_Running) + { + try + { + if (m_Listener != null && m_Listener.Pending()) + { + using (var client = m_Listener.AcceptTcpClient()) + { + AcceptCallback(client); + client.Close(); + } + } + } + catch (InvalidOperationException e) + { + m_StatusLabel = "Exception happened: " + e.Message; + Repaint(); + Debug.LogException(e); + } + } + + if (m_Running) + { + var adjustedtestTimeout = m_TestTimeout.Add(m_TestTimeout); + var timeout = ReceiveMessageTimeout > adjustedtestTimeout ? ReceiveMessageTimeout : adjustedtestTimeout; + if ((DateTime.Now - m_LastMessageReceived) > timeout) + { + Debug.LogError("Timeout when waiting for test results"); + m_RunFinished = true; + } + } + if (m_RunFinished) + { + Close(); + if (InternalEditorUtility.inBatchMode) + EditorApplication.Exit(m_TestFailed ? Batch.returnCodeTestsFailed : Batch.returnCodeTestsOk); + } + if (m_Repaint) Repaint(); + } + + public void OnEnable() + { + minSize = new Vector2(300, 100); + titleContent = new GUIContent("Test run monitor"); + Instance = this; + m_StatusLabel = "Initializing..."; + if (EditorApplication.isCompiling) return; + EnableServer(); + } + + private void EnableServer() + { + if (m_Configuration == null) throw new Exception("No result receiver server configuration."); + + var ipAddress = IPAddress.Any; + if (m_Configuration.ipList != null && m_Configuration.ipList.Count == 1) + ipAddress = IPAddress.Parse(m_Configuration.ipList.Single()); + + var ipAddStr = Equals(ipAddress, IPAddress.Any) ? "[All interfaces]" : ipAddress.ToString(); + + m_Listener = new TcpListener(ipAddress, m_Configuration.port); + m_StatusLabel = "Waiting for connection on: " + ipAddStr + ":" + m_Configuration.port; + + try + { + m_Listener.Start(100); + } + catch (SocketException e) + { + m_StatusLabel = "Exception happened: " + e.Message; + Repaint(); + Debug.LogException(e); + } + m_Running = true; + m_LastMessageReceived = DateTime.Now + m_InitialConnectionTimeout; + } + + public void OnDisable() + { + Instance = null; + if (m_Listener != null) + m_Listener.Stop(); + } + + public void OnGUI() + { + EditorGUILayout.LabelField("Status:", EditorStyles.boldLabel); + EditorGUILayout.LabelField(m_StatusLabel); + GUILayout.FlexibleSpace(); + if (GUILayout.Button("Stop")) + { + StopReceiver(); + if (InternalEditorUtility.inBatchMode) + EditorApplication.Exit(Batch.returnCodeRunError); + } + } + + public static void StartReceiver(PlatformRunnerConfiguration configuration) + { + var w = (NetworkResultsReceiver)GetWindow(typeof(NetworkResultsReceiver), false); + w.SetConfiguration(configuration); + if (!EditorApplication.isCompiling) + { + w.EnableServer(); + } + w.Show(true); + } + + private void SetConfiguration(PlatformRunnerConfiguration configuration) + { + m_Configuration = configuration; + } + + public static void StopReceiver() + { + if (Instance == null) return; + try{ + Instance.Close(); + }catch(Exception e){ + Debug.LogException(e); + DestroyImmediate(Instance); + } + } + } +} diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/NetworkResultsReceiver.cs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/NetworkResultsReceiver.cs.meta new file mode 100644 index 0000000..cfc201e --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/NetworkResultsReceiver.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ade4197221f35dc44adb7649f99af2e7 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunner.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunner.cs new file mode 100644 index 0000000..5c548bf --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunner.cs @@ -0,0 +1,128 @@ +using System; +using System.Collections.Generic; +using System.Net; +using System.Net.Sockets; +using UnityEditor; +using UnityEditorInternal; +using UnityEngine; +using System.Linq; + +namespace UnityTest.IntegrationTests +{ + public class PlatformRunner + { + public static BuildTarget defaultBuildTarget + { + get + { + var target = EditorPrefs.GetString("ITR-platformRunnerBuildTarget"); + BuildTarget buildTarget; + try + { + buildTarget = (BuildTarget)Enum.Parse(typeof(BuildTarget), target); + } + catch + { + return GetDefaultBuildTarget(); + } + return buildTarget; + } + set { EditorPrefs.SetString("ITR-platformRunnerBuildTarget", value.ToString()); } + } + + [MenuItem("Unity Test Tools/Platform Runner/Run current scene %#&r")] + public static void BuildAndRunCurrentScene() + { + Debug.Log("Building and running current test for " + defaultBuildTarget); + BuildAndRunInPlayer(new PlatformRunnerConfiguration(defaultBuildTarget)); + } + + [MenuItem("Unity Test Tools/Platform Runner/Run on platform %#r")] + public static void RunInPlayer() + { + var w = EditorWindow.GetWindow(typeof(PlatformRunnerSettingsWindow)); + w.Show(); + } + + public static void BuildAndRunInPlayer(PlatformRunnerConfiguration configuration) + { + NetworkResultsReceiver.StopReceiver(); + + var settings = new PlayerSettingConfigurator(false); + + if (configuration.sendResultsOverNetwork) + { + try + { + var l = new TcpListener(IPAddress.Any, configuration.port); + l.Start(); + configuration.port = ((IPEndPoint)l.Server.LocalEndPoint).Port; + l.Stop(); + } + catch (SocketException e) + { + Debug.LogException(e); + if (InternalEditorUtility.inBatchMode) + EditorApplication.Exit(Batch.returnCodeRunError); + } + } + + if (InternalEditorUtility.inBatchMode) + settings.AddConfigurationFile(TestRunnerConfigurator.batchRunFileMarker, ""); + + if (configuration.sendResultsOverNetwork) + settings.AddConfigurationFile(TestRunnerConfigurator.integrationTestsNetwork, + string.Join("\n", configuration.GetConnectionIPs())); + + settings.AddConfigurationFile (TestRunnerConfigurator.testScenesToRun, string.Join ("\n", configuration.testScenes.ToArray())); + + settings.ChangeSettingsForIntegrationTests(); + + AssetDatabase.Refresh(); + + var result = BuildPipeline.BuildPlayer(configuration.testScenes.Concat(configuration.buildScenes).ToArray(), + configuration.GetTempPath(), + configuration.buildTarget, + BuildOptions.AutoRunPlayer | BuildOptions.Development); + + settings.RevertSettingsChanges(); + settings.RemoveAllConfigurationFiles(); + + AssetDatabase.Refresh(); + + if (!string.IsNullOrEmpty(result)) + { + if (InternalEditorUtility.inBatchMode) + EditorApplication.Exit(Batch.returnCodeRunError); + return; + } + + if (configuration.sendResultsOverNetwork) + NetworkResultsReceiver.StartReceiver(configuration); + else if (InternalEditorUtility.inBatchMode) + EditorApplication.Exit(Batch.returnCodeTestsOk); + } + + private static BuildTarget GetDefaultBuildTarget() + { + switch (EditorUserBuildSettings.selectedBuildTargetGroup) + { + case BuildTargetGroup.Android: + return BuildTarget.Android; + default: + { + switch (Application.platform) + { + case RuntimePlatform.WindowsPlayer: + return BuildTarget.StandaloneWindows; + case RuntimePlatform.OSXPlayer: + return BuildTarget.StandaloneOSXIntel; + case RuntimePlatform.LinuxPlayer: + return BuildTarget.StandaloneLinux; + } + return BuildTarget.WebGL; + } + } + } + } +} diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunner.cs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunner.cs.meta new file mode 100644 index 0000000..5ecced0 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunner.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a3581fa3f207a8a4c9988b9f59a510d3 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunnerConfiguration.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunnerConfiguration.cs new file mode 100644 index 0000000..376b587 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunnerConfiguration.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Net.Sockets; +using UnityEditor; +using UnityEngine; +using UnityEngine.SceneManagement; + +[Serializable] +public class PlatformRunnerConfiguration +{ + public List buildScenes; + public List testScenes; + public BuildTarget buildTarget; + public bool runInEditor; + public string projectName = SceneManager.GetActiveScene().path; + + public string resultsDir = null; + public bool sendResultsOverNetwork; + public List ipList; + public int port; + + public PlatformRunnerConfiguration(BuildTarget buildTarget) + { + this.buildTarget = buildTarget; + projectName = SceneManager.GetActiveScene().path; + } + + public PlatformRunnerConfiguration() + : this(BuildTarget.StandaloneWindows) + { + } + + public string GetTempPath() + { + if (string.IsNullOrEmpty(projectName)) + projectName = Path.GetTempFileName(); + + var path = Path.Combine("Temp", projectName); + switch (buildTarget) + { + case BuildTarget.StandaloneWindows: + case BuildTarget.StandaloneWindows64: + return path + ".exe"; + case BuildTarget.StandaloneOSXIntel: + case BuildTarget.StandaloneOSXIntel64: + case BuildTarget.StandaloneLinuxUniversal: + return path + ".app"; + case BuildTarget.Android: + return path + ".apk"; + default: + return path; + } + } + + public string[] GetConnectionIPs() + { + return ipList.Select(ip => ip + ":" + port).ToArray(); + } + + public static int TryToGetFreePort() + { + var port = -1; + try + { + var l = new TcpListener(IPAddress.Any, 0); + l.Start(); + port = ((IPEndPoint)l.Server.LocalEndPoint).Port; + l.Stop(); + } + catch (SocketException e) + { + Debug.LogException(e); + } + return port; + } +} diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunnerConfiguration.cs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunnerConfiguration.cs.meta new file mode 100644 index 0000000..f747c6e --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunnerConfiguration.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b98fe8c3761da2d4b8cfd8bd6df7050f +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunnerSettings.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunnerSettings.cs new file mode 100644 index 0000000..8b54c3a --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunnerSettings.cs @@ -0,0 +1,12 @@ +using System; +using UnityEngine; + +namespace UnityTest +{ + public class PlatformRunnerSettings : ProjectSettingsBase + { + public string resultsPath; + public bool sendResultsOverNetwork = true; + public int port = 0; + } +} diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunnerSettings.cs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunnerSettings.cs.meta new file mode 100644 index 0000000..1cc9a28 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunnerSettings.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 964f5f0db2c95bb41aa3dc3beba1f06b +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunnerSettingsWindow.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunnerSettingsWindow.cs new file mode 100644 index 0000000..f7a04cb --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunnerSettingsWindow.cs @@ -0,0 +1,320 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using UnityEditor; +using UnityEngine; +using Object = UnityEngine.Object; +using UnityEngine.SceneManagement; + +namespace UnityTest.IntegrationTests +{ + [Serializable] + public class PlatformRunnerSettingsWindow : EditorWindow + { + private BuildTarget m_BuildTarget; + + private List m_IntegrationTestScenes; + private List m_OtherScenesToBuild; + private List m_AllScenesInProject; + + private Vector2 m_ScrollPositionIntegrationTests; + private Vector2 m_ScrollPositionOtherScenes; + private Vector2 m_ScrollPositionAllScenes; + private readonly List m_Interfaces = new List(); + private readonly List m_SelectedScenes = new List(); + + private int m_SelectedInterface; + [SerializeField] + private bool m_AdvancedNetworkingSettings; + + private PlatformRunnerSettings m_Settings; + + private string m_SelectedSceneInAll; + private string m_SelectedSceneInTest; + private string m_SelectedSceneInBuild; + + readonly GUIContent m_Label = new GUIContent("Results target directory", "Directory where the results will be saved. If no value is specified, the results will be generated in project's data folder."); + + void Awake() + { + if (m_OtherScenesToBuild == null) + m_OtherScenesToBuild = new List (); + + if (m_IntegrationTestScenes == null) + m_IntegrationTestScenes = new List (); + + titleContent = new GUIContent("Platform runner"); + m_BuildTarget = PlatformRunner.defaultBuildTarget; + position.Set(position.xMin, position.yMin, 200, position.height); + m_AllScenesInProject = Directory.GetFiles(Directory.GetCurrentDirectory(), "*.unity", SearchOption.AllDirectories).ToList(); + m_AllScenesInProject.Sort(); + var currentScene = (Directory.GetCurrentDirectory() + SceneManager.GetActiveScene().path).Replace("\\", "").Replace("/", ""); + var currentScenePath = m_AllScenesInProject.Where(s => s.Replace("\\", "").Replace("/", "") == currentScene); + m_SelectedScenes.AddRange(currentScenePath); + + m_Interfaces.Add("(Any)"); + m_Interfaces.AddRange(TestRunnerConfigurator.GetAvailableNetworkIPs()); + m_Interfaces.Add("127.0.0.1"); + + LoadFromPrefereneces (); + } + + public void OnEnable() + { + m_Settings = ProjectSettingsBase.Load(); + + // If not configured pre populate with all scenes that have test components on game objects + // This needs to be done outsie of constructor + if (m_IntegrationTestScenes.Count == 0) + m_IntegrationTestScenes = GetScenesWithTestComponents (m_AllScenesInProject); + } + + public void OnGUI() + { + EditorGUILayout.BeginVertical(); + GUIContent label; + + /* We have three lists here, The tests to run, supporting scenes to include in the build and the list of all scenes so users can + * pick the scenes they want to include. The motiviation here is that test scenes may require to additively load other scenes as part of the tests + */ + EditorGUILayout.BeginHorizontal (); + + // Integration Tests To Run + EditorGUILayout.BeginVertical (); + + label = new GUIContent("Tests:", "All Integration Test scenes that you wish to run on the platform"); + EditorGUILayout.LabelField(label, EditorStyles.boldLabel, GUILayout.Height(20f)); + + EditorGUI.BeginDisabledGroup(string.IsNullOrEmpty(m_SelectedSceneInTest)); + if (GUILayout.Button("Remove Integration Test")) { + m_IntegrationTestScenes.Remove(m_SelectedSceneInTest); + m_SelectedSceneInTest = ""; + } + EditorGUI.EndDisabledGroup(); + + DrawVerticalSceneList (ref m_IntegrationTestScenes, ref m_SelectedSceneInTest, ref m_ScrollPositionIntegrationTests); + EditorGUILayout.EndVertical (); + + // Extra scenes to include in build + EditorGUILayout.BeginVertical (); + label = new GUIContent("Other Scenes in Build:", "If your Integration Tests additivly load any other scenes then you want to include them here so they are part of the build"); + EditorGUILayout.LabelField(label, EditorStyles.boldLabel, GUILayout.Height(20f)); + + + EditorGUI.BeginDisabledGroup(string.IsNullOrEmpty(m_SelectedSceneInBuild)); + if (GUILayout.Button("Remove From Build")) { + m_OtherScenesToBuild.Remove(m_SelectedSceneInBuild); + m_SelectedSceneInBuild = ""; + } + EditorGUI.EndDisabledGroup(); + + DrawVerticalSceneList (ref m_OtherScenesToBuild, ref m_SelectedSceneInBuild, ref m_ScrollPositionOtherScenes); + EditorGUILayout.EndVertical (); + + EditorGUILayout.Separator (); + + // All Scenes + EditorGUILayout.BeginVertical (); + label = new GUIContent("Available Scenes", "These are all the scenes within your project, please select some to run tests"); + EditorGUILayout.LabelField(label, EditorStyles.boldLabel, GUILayout.Height(20f)); + + + EditorGUILayout.BeginHorizontal (); + EditorGUI.BeginDisabledGroup(string.IsNullOrEmpty(m_SelectedSceneInAll)); + if (GUILayout.Button("Add As Test")) { + if (!m_IntegrationTestScenes.Contains (m_SelectedSceneInAll) && !m_OtherScenesToBuild.Contains (m_SelectedSceneInAll)) { + m_IntegrationTestScenes.Add(m_SelectedSceneInAll); + } + } + + if (GUILayout.Button("Add to Build")) { + if (!m_IntegrationTestScenes.Contains (m_SelectedSceneInAll) && !m_OtherScenesToBuild.Contains (m_SelectedSceneInAll)) { + m_OtherScenesToBuild.Add(m_SelectedSceneInAll); + } + } + EditorGUI.EndDisabledGroup(); + + EditorGUILayout.EndHorizontal (); + + DrawVerticalSceneList (ref m_AllScenesInProject, ref m_SelectedSceneInAll, ref m_ScrollPositionAllScenes); + EditorGUILayout.EndVertical (); + + // ButtoNetworkResultsReceiverns to edit scenes in lists + + + EditorGUILayout.EndHorizontal (); + + GUILayout.Space(3); + + // Select target platform + m_BuildTarget = (BuildTarget)EditorGUILayout.EnumPopup("Build tests for", m_BuildTarget); + + if (PlatformRunner.defaultBuildTarget != m_BuildTarget) + { + if (GUILayout.Button("Make default target platform")) + { + PlatformRunner.defaultBuildTarget = m_BuildTarget; + } + } + GUI.enabled = true; + + // Select various Network settings + DrawSetting(); + var build = GUILayout.Button("Build and run tests"); + EditorGUILayout.EndVertical(); + + if (build) + { + BuildAndRun (); + } + } + + private void DrawVerticalSceneList(ref List sourceList, ref string selectString, ref Vector2 scrollPosition) + { + scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition, Styles.testList); + EditorGUI.indentLevel++; + foreach (var scenePath in sourceList) + { + var path = Path.GetFileNameWithoutExtension(scenePath); + var guiContent = new GUIContent(path, scenePath); + var rect = GUILayoutUtility.GetRect(guiContent, EditorStyles.label); + if (rect.Contains(Event.current.mousePosition)) + { + if (Event.current.type == EventType.mouseDown && Event.current.button == 0) + { + selectString = scenePath; + Event.current.Use(); + } + } + var style = new GUIStyle(EditorStyles.label); + + if (selectString == scenePath) + style.normal.textColor = new Color(0.3f, 0.5f, 0.85f); + EditorGUI.LabelField(rect, guiContent, style); + } + EditorGUI.indentLevel--; + EditorGUILayout.EndScrollView(); + } + + public static List GetScenesWithTestComponents(List allScenes) + { + List results = EditorReferencesUtil.FindScenesWhichContainAsset("TestComponent.cs"); + List integrationTestScenes = new List(); + + foreach (Object obj in results) { + string result = allScenes.FirstOrDefault(s => s.Contains(obj.name)); + if (!string.IsNullOrEmpty(result)) + integrationTestScenes.Add(result); + } + + return integrationTestScenes; + } + + private void DrawSetting() + { + EditorGUI.BeginChangeCheck(); + + EditorGUILayout.BeginHorizontal(); + m_Settings.resultsPath = EditorGUILayout.TextField(m_Label, m_Settings.resultsPath); + if (GUILayout.Button("Search", EditorStyles.miniButton, GUILayout.Width(50))) + { + var selectedPath = EditorUtility.SaveFolderPanel("Result files destination", m_Settings.resultsPath, ""); + if (!string.IsNullOrEmpty(selectedPath)) + m_Settings.resultsPath = Path.GetFullPath(selectedPath); + } + EditorGUILayout.EndHorizontal(); + + if (!string.IsNullOrEmpty(m_Settings.resultsPath)) + { + Uri uri; + if (!Uri.TryCreate(m_Settings.resultsPath, UriKind.Absolute, out uri) || !uri.IsFile || uri.IsWellFormedOriginalString()) + { + EditorGUILayout.HelpBox("Invalid URI path", MessageType.Warning); + } + } + + m_Settings.sendResultsOverNetwork = EditorGUILayout.Toggle("Send results to editor", m_Settings.sendResultsOverNetwork); + EditorGUI.BeginDisabledGroup(!m_Settings.sendResultsOverNetwork); + m_AdvancedNetworkingSettings = EditorGUILayout.Foldout(m_AdvancedNetworkingSettings, "Advanced network settings"); + if (m_AdvancedNetworkingSettings) + { + m_SelectedInterface = EditorGUILayout.Popup("Network interface", m_SelectedInterface, m_Interfaces.ToArray()); + EditorGUI.BeginChangeCheck(); + m_Settings.port = EditorGUILayout.IntField("Network port", m_Settings.port); + if (EditorGUI.EndChangeCheck()) + { + if (m_Settings.port > IPEndPoint.MaxPort) + m_Settings.port = IPEndPoint.MaxPort; + else if (m_Settings.port < IPEndPoint.MinPort) + m_Settings.port = IPEndPoint.MinPort; + } + } + + EditorGUI.EndDisabledGroup(); + + if (EditorGUI.EndChangeCheck()) + { + m_Settings.Save(); + } + } + + private void BuildAndRun() + { + SaveToPreferences (); + + var config = new PlatformRunnerConfiguration + { + buildTarget = m_BuildTarget, + buildScenes = m_OtherScenesToBuild, + testScenes = m_IntegrationTestScenes, + projectName = m_IntegrationTestScenes.Count > 1 ? "IntegrationTests" : Path.GetFileNameWithoutExtension(SceneManager.GetActiveScene().path), + resultsDir = m_Settings.resultsPath, + sendResultsOverNetwork = m_Settings.sendResultsOverNetwork, + ipList = m_Interfaces.Skip(1).ToList(), + port = m_Settings.port + }; + + if (m_SelectedInterface > 0) + config.ipList = new List {m_Interfaces.ElementAt(m_SelectedInterface)}; + + PlatformRunner.BuildAndRunInPlayer(config); + Close (); + } + + public void OnLostFocus() { + SaveToPreferences (); + } + + public void OnDestroy() { + SaveToPreferences (); + } + + private void SaveToPreferences() + { + EditorPrefs.SetString (Animator.StringToHash (Application.dataPath + "uttTestScenes").ToString (), String.Join (",",m_IntegrationTestScenes.ToArray())); + EditorPrefs.SetString (Animator.StringToHash (Application.dataPath + "uttBuildScenes").ToString (), String.Join (",",m_OtherScenesToBuild.ToArray())); + } + + private void LoadFromPrefereneces() + { + string storedTestScenes = EditorPrefs.GetString (Animator.StringToHash (Application.dataPath + "uttTestScenes").ToString ()); + string storedBuildScenes = EditorPrefs.GetString (Animator.StringToHash (Application.dataPath + "uttBuildScenes").ToString ()); + + List parsedTestScenes = storedTestScenes.Split (',').ToList (); + List parsedBuildScenes = storedBuildScenes.Split (',').ToList (); + + // Sanity check scenes actually exist + foreach (string str in parsedTestScenes) { + if (m_AllScenesInProject.Contains(str)) + m_IntegrationTestScenes.Add(str); + } + + foreach (string str in parsedBuildScenes) { + if (m_AllScenesInProject.Contains(str)) + m_OtherScenesToBuild.Add(str); + } + } + } +} diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunnerSettingsWindow.cs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunnerSettingsWindow.cs.meta new file mode 100644 index 0000000..8fed609 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunnerSettingsWindow.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3819282b0887bc742911b89745080acb +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlayerSettingConfigurator.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlayerSettingConfigurator.cs new file mode 100644 index 0000000..77aea81 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlayerSettingConfigurator.cs @@ -0,0 +1,73 @@ +using System; +using System.Collections.Generic; +using System.IO; +using UnityEditor; +using UnityEngine; + +namespace UnityTest +{ + class PlayerSettingConfigurator + { + private string resourcesPath { + get { return m_Temp ? k_TempPath : m_ProjectResourcesPath; } + } + + private readonly string m_ProjectResourcesPath = Path.Combine("Assets", "Resources"); + const string k_TempPath = "Temp"; + private readonly bool m_Temp; + + private ResolutionDialogSetting m_DisplayResolutionDialog; + private bool m_RunInBackground; + private bool m_FullScreen; + private bool m_ResizableWindow; + private readonly List m_TempFileList = new List(); + + public PlayerSettingConfigurator(bool saveInTempFolder) + { + m_Temp = saveInTempFolder; + } + + public void ChangeSettingsForIntegrationTests() + { + m_DisplayResolutionDialog = PlayerSettings.displayResolutionDialog; + PlayerSettings.displayResolutionDialog = ResolutionDialogSetting.Disabled; + + m_RunInBackground = PlayerSettings.runInBackground; + PlayerSettings.runInBackground = true; + + m_FullScreen = PlayerSettings.defaultIsFullScreen; + PlayerSettings.defaultIsFullScreen = false; + + m_ResizableWindow = PlayerSettings.resizableWindow; + PlayerSettings.resizableWindow = true; + } + + public void RevertSettingsChanges() + { + PlayerSettings.defaultIsFullScreen = m_FullScreen; + PlayerSettings.runInBackground = m_RunInBackground; + PlayerSettings.displayResolutionDialog = m_DisplayResolutionDialog; + PlayerSettings.resizableWindow = m_ResizableWindow; + } + + public void AddConfigurationFile(string fileName, string content) + { + var resourcesPathExists = Directory.Exists(resourcesPath); + if (!resourcesPathExists) AssetDatabase.CreateFolder("Assets", "Resources"); + + var filePath = Path.Combine(resourcesPath, fileName); + File.WriteAllText(filePath, content); + + m_TempFileList.Add(filePath); + } + + public void RemoveAllConfigurationFiles() + { + foreach (var filePath in m_TempFileList) + AssetDatabase.DeleteAsset(filePath); + if (Directory.Exists(resourcesPath) + && Directory.GetFiles(resourcesPath).Length == 0) + AssetDatabase.DeleteAsset(resourcesPath); + } + } +} diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlayerSettingConfigurator.cs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlayerSettingConfigurator.cs.meta new file mode 100644 index 0000000..732b8be --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlayerSettingConfigurator.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c7adbe43058d54047b6109b2e66894fd +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Renderer.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Renderer.meta new file mode 100644 index 0000000..ccb3c14 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Renderer.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 5944b82e46f1682439d20b4c3a4f029c +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Renderer/IntegrationTestGroupLine.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Renderer/IntegrationTestGroupLine.cs new file mode 100644 index 0000000..a7d8619 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Renderer/IntegrationTestGroupLine.cs @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine; + +namespace UnityTest +{ + class IntegrationTestGroupLine : IntegrationTestRendererBase + { + public static List FoldMarkers; + private IntegrationTestRendererBase[] m_Children; + + public IntegrationTestGroupLine(GameObject gameObject) : base(gameObject) + { + } + + protected internal override void DrawLine(Rect rect, GUIContent label, bool isSelected, RenderingOptions options) + { + EditorGUI.BeginChangeCheck(); + var isClassFolded = !EditorGUI.Foldout(rect, !Folded, label, isSelected ? Styles.selectedFoldout : Styles.foldout); + if (EditorGUI.EndChangeCheck()) Folded = isClassFolded; + } + + private bool Folded + { + get { return FoldMarkers.Contains(m_GameObject); } + + set + { + if (value) FoldMarkers.Add(m_GameObject); + else FoldMarkers.RemoveAll(s => s == m_GameObject); + } + } + + protected internal override void Render(int indend, RenderingOptions options) + { + base.Render(indend, options); + if (!Folded) + foreach (var child in m_Children) + child.Render(indend + 1, options); + } + + protected internal override TestResult.ResultType GetResult() + { + bool ignored = false; + bool success = false; + foreach (var child in m_Children) + { + var result = child.GetResult(); + + if (result == TestResult.ResultType.Failed || result == TestResult.ResultType.FailedException || result == TestResult.ResultType.Timeout) + return TestResult.ResultType.Failed; + if (result == TestResult.ResultType.Success) + success = true; + else if (result == TestResult.ResultType.Ignored) + ignored = true; + else + ignored = false; + } + if (success) return TestResult.ResultType.Success; + if (ignored) return TestResult.ResultType.Ignored; + return TestResult.ResultType.NotRun; + } + + protected internal override bool IsVisible(RenderingOptions options) + { + return m_Children.Any(c => c.IsVisible(options)); + } + + public override bool SetCurrentTest(TestComponent tc) + { + m_IsRunning = false; + foreach (var child in m_Children) + m_IsRunning |= child.SetCurrentTest(tc); + return m_IsRunning; + } + + public void AddChildren(IntegrationTestRendererBase[] parseTestList) + { + m_Children = parseTestList; + } + } +} diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Renderer/IntegrationTestGroupLine.cs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Renderer/IntegrationTestGroupLine.cs.meta new file mode 100644 index 0000000..0051064 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Renderer/IntegrationTestGroupLine.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f6dc74195aa98ef4da8901199cda4a63 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Renderer/IntegrationTestLine.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Renderer/IntegrationTestLine.cs new file mode 100644 index 0000000..9f4f35d --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Renderer/IntegrationTestLine.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + +namespace UnityTest +{ + class IntegrationTestLine : IntegrationTestRendererBase + { + public static List Results; + protected TestResult m_Result; + + public IntegrationTestLine(GameObject gameObject, TestResult testResult) : base(gameObject) + { + m_Result = testResult; + } + + protected internal override void DrawLine(Rect rect, GUIContent label, bool isSelected, RenderingOptions options) + { + if(Event.current.type != EventType.repaint) + return; + + Styles.testName.Draw (rect, label, false, false, false, isSelected); + + if (m_Result.IsTimeout) + { + float min, max; + Styles.testName.CalcMinMaxWidth(label, out min, out max); + var timeoutRect = new Rect(rect); + timeoutRect.x += min - 12; + Styles.testName.Draw(timeoutRect, s_GUITimeoutIcon, false, false, false, isSelected); + } + } + + protected internal override TestResult.ResultType GetResult() + { + if (!m_Result.Executed && test.ignored) return TestResult.ResultType.Ignored; + return m_Result.resultType; + } + + protected internal override bool IsVisible(RenderingOptions options) + { + if (!string.IsNullOrEmpty(options.nameFilter) && !m_GameObject.name.ToLower().Contains(options.nameFilter.ToLower())) return false; + if (!options.showSucceeded && m_Result.IsSuccess) return false; + if (!options.showFailed && m_Result.IsFailure) return false; + if (!options.showNotRunned && !m_Result.Executed) return false; + if (!options.showIgnored && test.ignored) return false; + return true; + } + + public override bool SetCurrentTest(TestComponent tc) + { + m_IsRunning = test == tc; + return m_IsRunning; + } + } +} diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Renderer/IntegrationTestLine.cs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Renderer/IntegrationTestLine.cs.meta new file mode 100644 index 0000000..25c9f11 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Renderer/IntegrationTestLine.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 212be02e4a7da194688b08ab0c946fbd +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Renderer/IntegrationTestRendererBase.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Renderer/IntegrationTestRendererBase.cs new file mode 100644 index 0000000..0ab3125 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Renderer/IntegrationTestRendererBase.cs @@ -0,0 +1,161 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine; +using Object = UnityEngine.Object; + +namespace UnityTest +{ + public abstract class IntegrationTestRendererBase : IComparable + { + public static Action> RunTest; + + protected static bool s_Refresh; + + private static readonly GUIContent k_GUIRunSelected = new GUIContent("Run Selected"); + private static readonly GUIContent k_GUIRun = new GUIContent("Run"); + private static readonly GUIContent k_GUIDelete = new GUIContent("Delete"); + private static readonly GUIContent k_GUIDeleteSelected = new GUIContent("Delete selected"); + + protected static GUIContent s_GUITimeoutIcon = new GUIContent(Icons.StopwatchImg, "Timeout"); + + protected GameObject m_GameObject; + public TestComponent test; + private readonly string m_Name; + + protected IntegrationTestRendererBase(GameObject gameObject) + { + test = gameObject.GetComponent(typeof(TestComponent)) as TestComponent; + if (test == null) throw new ArgumentException("Provided GameObject is not a test object"); + m_GameObject = gameObject; + m_Name = test.Name; + } + + public int CompareTo(IntegrationTestRendererBase other) + { + return test.CompareTo(other.test); + } + + public bool Render(RenderingOptions options) + { + s_Refresh = false; + EditorGUIUtility.SetIconSize(new Vector2(15, 15)); + Render(0, options); + EditorGUIUtility.SetIconSize(Vector2.zero); + return s_Refresh; + } + + protected internal virtual void Render(int indend, RenderingOptions options) + { + if (!IsVisible(options)) return; + EditorGUILayout.BeginHorizontal(); + GUILayout.Space(indend * 10); + + var tempColor = GUI.color; + if (m_IsRunning) + { + var frame = Mathf.Abs(Mathf.Cos(Time.realtimeSinceStartup * 4)) * 0.6f + 0.4f; + GUI.color = new Color(1, 1, 1, frame); + } + + var isSelected = Selection.gameObjects.Contains(m_GameObject); + + var value = GetResult(); + var icon = GetIconForResult(value); + + var label = new GUIContent(m_Name, icon); + var labelRect = GUILayoutUtility.GetRect(label, EditorStyles.label, GUILayout.ExpandWidth(true), GUILayout.Height(18)); + + OnLeftMouseButtonClick(labelRect); + OnContextClick(labelRect); + DrawLine(labelRect, label, isSelected, options); + + if (m_IsRunning) GUI.color = tempColor; + EditorGUILayout.EndHorizontal(); + } + + protected void OnSelect() + { + if (!Event.current.control && !Event.current.command) + { + Selection.objects = new Object[0]; + GUIUtility.keyboardControl = 0; + } + + if ((Event.current.control || Event.current.command) && Selection.gameObjects.Contains(test.gameObject)) + Selection.objects = Selection.gameObjects.Where(o => o != test.gameObject).ToArray(); + else + Selection.objects = Selection.gameObjects.Concat(new[] { test.gameObject }).ToArray(); + } + + protected void OnLeftMouseButtonClick(Rect rect) + { + if (rect.Contains(Event.current.mousePosition) && Event.current.type == EventType.mouseDown && Event.current.button == 0) + { + rect.width = 20; + if (rect.Contains(Event.current.mousePosition)) return; + Event.current.Use(); + OnSelect(); + } + } + + protected void OnContextClick(Rect rect) + { + if (rect.Contains(Event.current.mousePosition) && Event.current.type == EventType.ContextClick) + { + DrawContextMenu(test); + } + } + + public static void DrawContextMenu(TestComponent testComponent) + { + if (EditorApplication.isPlayingOrWillChangePlaymode) return; + + var selectedTests = Selection.gameObjects.Where(go => go.GetComponent(typeof(TestComponent))); + var manySelected = selectedTests.Count() > 1; + + var m = new GenericMenu(); + if (manySelected) + { + // var testsToRun + m.AddItem(k_GUIRunSelected, false, data => RunTest(selectedTests.Select(o => o.GetComponent(typeof(TestComponent))).Cast().ToList()), null); + } + m.AddItem(k_GUIRun, false, data => RunTest(new[] { testComponent }), null); + m.AddSeparator(""); + m.AddItem(manySelected ? k_GUIDeleteSelected : k_GUIDelete, false, data => RemoveTests(selectedTests.ToArray()), null); + m.ShowAsContext(); + } + + private static void RemoveTests(GameObject[] testsToDelete) + { + foreach (var t in testsToDelete) + { + Undo.DestroyObjectImmediate(t); + } + } + + public static Texture GetIconForResult(TestResult.ResultType resultState) + { + switch (resultState) + { + case TestResult.ResultType.Success: + return Icons.SuccessImg; + case TestResult.ResultType.Timeout: + case TestResult.ResultType.Failed: + case TestResult.ResultType.FailedException: + return Icons.FailImg; + case TestResult.ResultType.Ignored: + return Icons.IgnoreImg; + default: + return Icons.UnknownImg; + } + } + + protected internal bool m_IsRunning; + protected internal abstract void DrawLine(Rect rect, GUIContent label, bool isSelected, RenderingOptions options); + protected internal abstract TestResult.ResultType GetResult(); + protected internal abstract bool IsVisible(RenderingOptions options); + public abstract bool SetCurrentTest(TestComponent tc); + } +} diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Renderer/IntegrationTestRendererBase.cs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Renderer/IntegrationTestRendererBase.cs.meta new file mode 100644 index 0000000..1fb186e --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Renderer/IntegrationTestRendererBase.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 604645a3b57179a4d873906b625ef8ec +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Renderer/RenderingOptions.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Renderer/RenderingOptions.cs new file mode 100644 index 0000000..5d16efc --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Renderer/RenderingOptions.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace UnityTest +{ + public class RenderingOptions + { + public string nameFilter; + public bool showSucceeded; + public bool showFailed; + public bool showIgnored; + public bool showNotRunned; + public string[] categories; + } +} diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Renderer/RenderingOptions.cs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Renderer/RenderingOptions.cs.meta new file mode 100644 index 0000000..6ecfc38 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Renderer/RenderingOptions.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5c0aec4b4a6d1b047a98e8cc213e1a36 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/TestComponentEditor.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/TestComponentEditor.cs new file mode 100644 index 0000000..9d5104e --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/TestComponentEditor.cs @@ -0,0 +1,129 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine; +using Object = UnityEngine.Object; +using UnityEditor.SceneManagement; + +namespace UnityTest +{ + [CanEditMultipleObjects] + [CustomEditor(typeof(TestComponent))] + public class TestComponentEditor : Editor + { + private SerializedProperty m_ExpectException; + private SerializedProperty m_ExpectedExceptionList; + private SerializedProperty m_Ignored; + private SerializedProperty m_SucceedAssertions; + private SerializedProperty m_SucceedWhenExceptionIsThrown; + private SerializedProperty m_Timeout; + + #region GUI Contens + + private readonly GUIContent m_GUIExpectException = new GUIContent("Expect exception", "Should the test expect an exception"); + private readonly GUIContent m_GUIExpectExceptionList = new GUIContent("Expected exception list", "A comma separated list of exception types which will not fail the test when thrown"); + private readonly GUIContent m_GUIIgnore = new GUIContent("Ignore", "Ignore the tests in runs"); + private readonly GUIContent m_GUIIncludePlatforms = new GUIContent("Included platforms", "Platform on which the test should run"); + private readonly GUIContent m_GUISuccedOnAssertions = new GUIContent("Succeed on assertions", "Succeed after all assertions are executed"); + private readonly GUIContent m_GUISucceedWhenExceptionIsThrown = new GUIContent("Succeed when exception is thrown", "Should the test succeed when an expected exception is thrown"); + private readonly GUIContent m_GUITestName = new GUIContent("Test name", "Name of the test (is equal to the GameObject name)"); + private readonly GUIContent m_GUITimeout = new GUIContent("Timeout", "Number of seconds after which the test will timeout"); + + #endregion + + public void OnEnable() + { + m_Timeout = serializedObject.FindProperty("timeout"); + m_Ignored = serializedObject.FindProperty("ignored"); + m_SucceedAssertions = serializedObject.FindProperty("succeedAfterAllAssertionsAreExecuted"); + m_ExpectException = serializedObject.FindProperty("expectException"); + m_ExpectedExceptionList = serializedObject.FindProperty("expectedExceptionList"); + m_SucceedWhenExceptionIsThrown = serializedObject.FindProperty("succeedWhenExceptionIsThrown"); + } + + public override void OnInspectorGUI() + { + var component = (TestComponent)target; + + if (component.dynamic) + { + if(GUILayout.Button("Reload dynamic tests")) + { + TestComponent.DestroyAllDynamicTests(); + Selection.objects = new Object[0]; + IntegrationTestsRunnerWindow.selectedInHierarchy = false; + GUIUtility.ExitGUI(); + return; + } + EditorGUILayout.HelpBox("This is a test generated from code. No changes in the component will be persisted.", MessageType.Info); + } + + if (component.IsTestGroup()) + { + EditorGUI.BeginChangeCheck(); + var newGroupName = EditorGUILayout.TextField(m_GUITestName, component.name); + if (EditorGUI.EndChangeCheck()) component.name = newGroupName; + + serializedObject.ApplyModifiedProperties(); + return; + } + + serializedObject.Update(); + + EditorGUI.BeginDisabledGroup(serializedObject.isEditingMultipleObjects); + + EditorGUI.BeginChangeCheck(); + var newName = EditorGUILayout.TextField(m_GUITestName, component.name); + if (EditorGUI.EndChangeCheck()) component.name = newName; + + if (component.platformsToIgnore == null) + { + component.platformsToIgnore = GetListOfIgnoredPlatforms(Enum.GetNames(typeof(TestComponent.IncludedPlatforms)), (int)component.includedPlatforms); + } + + var enumList = Enum.GetNames(typeof(RuntimePlatform)); + var flags = GetFlagList(enumList, component.platformsToIgnore); + flags = EditorGUILayout.MaskField(m_GUIIncludePlatforms, flags, enumList, EditorStyles.popup); + var newList = GetListOfIgnoredPlatforms(enumList, flags); + if (!component.dynamic) + component.platformsToIgnore = newList; + EditorGUI.EndDisabledGroup(); + + EditorGUILayout.PropertyField(m_Timeout, m_GUITimeout); + EditorGUILayout.PropertyField(m_Ignored, m_GUIIgnore); + EditorGUILayout.PropertyField(m_SucceedAssertions, m_GUISuccedOnAssertions); + EditorGUILayout.PropertyField(m_ExpectException, m_GUIExpectException); + + EditorGUI.BeginDisabledGroup(!m_ExpectException.boolValue); + EditorGUILayout.PropertyField(m_ExpectedExceptionList, m_GUIExpectExceptionList); + EditorGUILayout.PropertyField(m_SucceedWhenExceptionIsThrown, m_GUISucceedWhenExceptionIsThrown); + EditorGUI.EndDisabledGroup(); + + if (!component.dynamic) + serializedObject.ApplyModifiedProperties(); + if (GUI.changed) + EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene()); + } + + private string[] GetListOfIgnoredPlatforms(string[] enumList, int flags) + { + var notSelectedPlatforms = new List(); + for (int i = 0; i < enumList.Length; i++) + { + var sel = (flags & (1 << i)) != 0; + if (!sel) notSelectedPlatforms.Add(enumList[i]); + } + return notSelectedPlatforms.ToArray(); + } + + private int GetFlagList(string[] enumList, string[] platformsToIgnore) + { + int flags = ~0; + for (int i = 0; i < enumList.Length; i++) + if (platformsToIgnore != null && platformsToIgnore.Any(s => s == enumList[i])) + flags &= ~(1 << i); + return flags; + } + } +} diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/TestComponentEditor.cs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/TestComponentEditor.cs.meta new file mode 100644 index 0000000..e3a1348 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/TestComponentEditor.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 160889f21f4d5944b9f6fcaf9c33f684 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/ITestRunnerCallback.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/ITestRunnerCallback.cs new file mode 100644 index 0000000..c74dab9 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/ITestRunnerCallback.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace UnityTest.IntegrationTestRunner +{ + public interface ITestRunnerCallback + { + void RunStarted(string platform, List testsToRun); + void RunFinished(List testResults); + void AllScenesFinished(); + void TestStarted(TestResult test); + void TestFinished(TestResult test); + void TestRunInterrupted(List testsNotRun); + } +} diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/ITestRunnerCallback.cs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/ITestRunnerCallback.cs.meta new file mode 100644 index 0000000..3a1c54b --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/ITestRunnerCallback.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 35af7d395e501a348ae1a0aa3c91dee4 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/IntegrationTest.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/IntegrationTest.cs new file mode 100644 index 0000000..de0e6d1 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/IntegrationTest.cs @@ -0,0 +1,176 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using UnityEngine; + +public static class IntegrationTest +{ + public const string passMessage = "IntegrationTest Pass"; + public const string failMessage = "IntegrationTest Fail"; + + public static void Pass() + { + LogResult(passMessage); + } + + public static void Pass(GameObject go) + { + LogResult(go, passMessage); + } + + public static void Fail(string reason) + { + Fail(); + if (!string.IsNullOrEmpty(reason)) Debug.Log(reason); + } + + public static void Fail(GameObject go, string reason) + { + Fail(go); + if (!string.IsNullOrEmpty(reason)) Debug.Log(reason); + } + + public static void Fail() + { + LogResult(failMessage); + } + + public static void Fail(GameObject go) + { + LogResult(go, failMessage); + } + + public static void Assert(bool condition) + { + Assert(condition, ""); + } + + public static void Assert(GameObject go, bool condition) + { + Assert(go, condition, ""); + } + + public static void Assert(bool condition, string message) + { + if (!condition) + Fail(message); + } + + public static void Assert(GameObject go, bool condition, string message) + { + if (!condition) + Fail(go, message); + } + + private static void LogResult(string message) + { + Debug.Log(message); + } + + private static void LogResult(GameObject go, string message) + { + Debug.Log(message + " (" + FindTestObject(go).name + ")", go); + } + + private static GameObject FindTestObject(GameObject go) + { + var temp = go; + while (temp.transform.parent != null) + { + if (temp.GetComponent("TestComponent") != null) + return temp; + temp = temp.transform.parent.gameObject; + } + return go; + } + + #region Dynamic test attributes + + [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] + public class ExcludePlatformAttribute : Attribute + { + public string[] platformsToExclude; + + public ExcludePlatformAttribute(params RuntimePlatform[] platformsToExclude) + { + this.platformsToExclude = platformsToExclude.Select(platform => platform.ToString()).ToArray(); + } + } + + [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] + public class ExpectExceptions : Attribute + { + public string[] exceptionTypeNames; + public bool succeedOnException; + + public ExpectExceptions() : this(false) + { + } + + public ExpectExceptions(bool succeedOnException) : this(succeedOnException, new string[0]) + { + } + + public ExpectExceptions(bool succeedOnException, params string[] exceptionTypeNames) + { + this.succeedOnException = succeedOnException; + this.exceptionTypeNames = exceptionTypeNames; + } + + public ExpectExceptions(bool succeedOnException, params Type[] exceptionTypes) + : this(succeedOnException, exceptionTypes.Select(type => type.FullName).ToArray()) + { + } + + public ExpectExceptions(params string[] exceptionTypeNames) : this(false, exceptionTypeNames) + { + } + + public ExpectExceptions(params Type[] exceptionTypes) : this(false, exceptionTypes) + { + } + } + + [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] + public class IgnoreAttribute : Attribute + { + } + + [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] + public class DynamicTestAttribute : Attribute + { + private readonly string m_SceneName; + + public DynamicTestAttribute(string sceneName) + { + if (sceneName.EndsWith(".unity")) + sceneName = sceneName.Substring(0, sceneName.Length - ".unity".Length); + m_SceneName = sceneName; + } + + public bool IncludeOnScene(string sceneName) + { + var fileName = Path.GetFileNameWithoutExtension(sceneName); + return fileName == m_SceneName; + } + } + + [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] + public class SucceedWithAssertions : Attribute + { + } + + [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] + public class TimeoutAttribute : Attribute + { + public float timeout; + + public TimeoutAttribute(float seconds) + { + timeout = seconds; + } + } + + #endregion +} diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/IntegrationTest.cs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/IntegrationTest.cs.meta new file mode 100644 index 0000000..b6974b8 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/IntegrationTest.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: eb367bbc76e489443a4ebc8b0a8642f4 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/IntegrationTestAttribute.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/IntegrationTestAttribute.cs new file mode 100644 index 0000000..9ca4e45 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/IntegrationTestAttribute.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.IO; +using UnityEngine; + +[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] +public class IntegrationTestAttribute : Attribute +{ + private readonly string m_Path; + + public IntegrationTestAttribute(string path) + { + if (path.EndsWith(".unity")) + path = path.Substring(0, path.Length - ".unity".Length); + m_Path = path; + } + + public bool IncludeOnScene(string scenePath) + { + if (scenePath == m_Path) return true; + var fileName = Path.GetFileNameWithoutExtension(scenePath); + return fileName == m_Path; + } +} diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/IntegrationTestAttribute.cs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/IntegrationTestAttribute.cs.meta new file mode 100644 index 0000000..1c80721 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/IntegrationTestAttribute.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f1a5c61a06ed66e41a6ee1b5f88b5afd +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/IntegrationTestsProvider.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/IntegrationTestsProvider.cs new file mode 100644 index 0000000..c38d3c4 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/IntegrationTestsProvider.cs @@ -0,0 +1,109 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; + +namespace UnityTest.IntegrationTestRunner +{ + class IntegrationTestsProvider + { + internal Dictionary> testCollection = new Dictionary>(); + internal ITestComponent currentTestGroup; + internal IEnumerable testToRun; + + public IntegrationTestsProvider(IEnumerable tests) + { + testToRun = tests; + foreach (var test in tests.OrderBy(component => component)) + { + if (test.IsTestGroup()) + { + throw new Exception(test.Name + " is test a group"); + } + AddTestToList(test); + } + if (currentTestGroup == null) + { + currentTestGroup = FindInnerTestGroup(TestComponent.NullTestComponent); + } + } + + private void AddTestToList(ITestComponent test) + { + var group = test.GetTestGroup(); + if (!testCollection.ContainsKey(group)) + testCollection.Add(group, new HashSet()); + testCollection[group].Add(test); + if (group == TestComponent.NullTestComponent) return; + AddTestToList(group); + } + + public ITestComponent GetNextTest() + { + var test = testCollection[currentTestGroup].First(); + testCollection[currentTestGroup].Remove(test); + test.EnableTest(true); + return test; + } + + public void FinishTest(ITestComponent test) + { + try + { + test.EnableTest(false); + currentTestGroup = FindNextTestGroup(currentTestGroup); + } + catch (MissingReferenceException e) + { + Debug.LogException(e); + } + } + + private ITestComponent FindNextTestGroup(ITestComponent testGroup) + { + if (testGroup == null) + throw new Exception ("No test left"); + + if (testCollection[testGroup].Any()) + { + testGroup.EnableTest(true); + return FindInnerTestGroup(testGroup); + } + testCollection.Remove(testGroup); + testGroup.EnableTest(false); + + var parentTestGroup = testGroup.GetTestGroup(); + if (parentTestGroup == null) return null; + + testCollection[parentTestGroup].Remove(testGroup); + return FindNextTestGroup(parentTestGroup); + } + + private ITestComponent FindInnerTestGroup(ITestComponent group) + { + var innerGroups = testCollection[group]; + foreach (var innerGroup in innerGroups) + { + if (!innerGroup.IsTestGroup()) continue; + innerGroup.EnableTest(true); + return FindInnerTestGroup(innerGroup); + } + return group; + } + + public bool AnyTestsLeft() + { + return testCollection.Count != 0; + } + + public List GetRemainingTests() + { + var remainingTests = new List(); + foreach (var test in testCollection) + { + remainingTests.AddRange(test.Value); + } + return remainingTests; + } + } +} diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/IntegrationTestsProvider.cs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/IntegrationTestsProvider.cs.meta new file mode 100644 index 0000000..d444629 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/IntegrationTestsProvider.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 21d32637b19ee51489062a66ad922193 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/NetworkResultSender.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/NetworkResultSender.cs new file mode 100644 index 0000000..16145c0 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/NetworkResultSender.cs @@ -0,0 +1,112 @@ +#if !UNITY_METRO && (UNITY_PRO_LICENSE || !(UNITY_ANDROID || UNITY_IPHONE)) +#define UTT_SOCKETS_SUPPORTED +#endif +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityTest.IntegrationTestRunner; + +#if UTT_SOCKETS_SUPPORTED +using System.Net.Sockets; +using System.Runtime.Serialization.Formatters.Binary; +#endif + +namespace UnityTest +{ + public class NetworkResultSender : ITestRunnerCallback + { +#if UTT_SOCKETS_SUPPORTED + private readonly TimeSpan m_ConnectionTimeout = TimeSpan.FromSeconds(5); + + private readonly string m_Ip; + private readonly int m_Port; +#endif + private bool m_LostConnection; + + public NetworkResultSender(string ip, int port) + { +#if UTT_SOCKETS_SUPPORTED + m_Ip = ip; + m_Port = port; +#endif + } + + private bool SendDTO(ResultDTO dto) + { + if (m_LostConnection) return false; +#if UTT_SOCKETS_SUPPORTED + try + { + using (var tcpClient = new TcpClient()) + { + var result = tcpClient.BeginConnect(m_Ip, m_Port, null, null); + var success = result.AsyncWaitHandle.WaitOne(m_ConnectionTimeout); + if (!success) + { + return false; + } + try + { + tcpClient.EndConnect(result); + } + catch (SocketException) + { + m_LostConnection = true; + return false; + } + + var bf = new DTOFormatter(); + bf.Serialize(tcpClient.GetStream(), dto); + tcpClient.GetStream().Close(); + tcpClient.Close(); + Debug.Log("Sent " + dto.messageType); + } + } + catch (SocketException e) + { + Debug.LogException(e); + m_LostConnection = true; + return false; + } +#endif // if UTT_SOCKETS_SUPPORTED + return true; + } + + public bool Ping() + { + var result = SendDTO(ResultDTO.CreatePing()); + m_LostConnection = false; + return result; + } + + public void RunStarted(string platform, List testsToRun) + { + SendDTO(ResultDTO.CreateRunStarted()); + } + + public void RunFinished(List testResults) + { + SendDTO(ResultDTO.CreateRunFinished(testResults)); + } + + public void TestStarted(TestResult test) + { + SendDTO(ResultDTO.CreateTestStarted(test)); + } + + public void TestFinished(TestResult test) + { + SendDTO(ResultDTO.CreateTestFinished(test)); + } + + public void AllScenesFinished() + { + SendDTO (ResultDTO.CreateAllScenesFinished ()); + } + + public void TestRunInterrupted(List testsNotRun) + { + RunFinished(new List()); + } + } +} diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/NetworkResultSender.cs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/NetworkResultSender.cs.meta new file mode 100644 index 0000000..2ed06e1 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/NetworkResultSender.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 80b91644bbbc487479429368d4e8d596 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/ResultDTO.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/ResultDTO.cs new file mode 100644 index 0000000..e8a8e4e --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/ResultDTO.cs @@ -0,0 +1,168 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.SceneManagement; + +namespace UnityTest +{ + [Serializable] + public class ResultDTO + { + public MessageType messageType; + public int levelCount; + public int loadedLevel; + public string loadedLevelName; + public string testName; + public float testTimeout; + public ITestResult testResult; + + private ResultDTO(MessageType messageType) + { + this.messageType = messageType; + levelCount = UnityEngine.SceneManagement.SceneManager.sceneCount; + loadedLevel = UnityEngine.SceneManagement.SceneManager.GetActiveScene().buildIndex; + loadedLevelName = UnityEngine.SceneManagement.SceneManager.GetActiveScene().name; + } + + public enum MessageType : byte + { + Ping, + RunStarted, + RunFinished, + TestStarted, + TestFinished, + RunInterrupted, + AllScenesFinished + } + + public static ResultDTO CreatePing() + { + var dto = new ResultDTO(MessageType.Ping); + return dto; + } + + public static ResultDTO CreateRunStarted() + { + var dto = new ResultDTO(MessageType.RunStarted); + return dto; + } + + public static ResultDTO CreateRunFinished(List testResults) + { + var dto = new ResultDTO(MessageType.RunFinished); + return dto; + } + + public static ResultDTO CreateTestStarted(TestResult test) + { + var dto = new ResultDTO(MessageType.TestStarted); + dto.testName = test.FullName; + dto.testTimeout = test.TestComponent.timeout; + return dto; + } + + public static ResultDTO CreateTestFinished(TestResult test) + { + var dto = new ResultDTO(MessageType.TestFinished); + dto.testName = test.FullName; + dto.testResult = GetSerializableTestResult(test); + return dto; + } + + public static ResultDTO CreateAllScenesFinished() + { + var dto = new ResultDTO(MessageType.AllScenesFinished); + return dto; + } + + private static ITestResult GetSerializableTestResult(TestResult test) + { + var str = new SerializableTestResult(); + + str.resultState = test.ResultState; + str.message = test.messages; + str.executed = test.Executed; + str.name = test.Name; + str.fullName = test.FullName; + str.id = test.id; + str.isSuccess = test.IsSuccess; + str.duration = test.duration; + str.stackTrace = test.stacktrace; + str.isIgnored = test.IsIgnored; + + return str; + } + } + + #region SerializableTestResult + [Serializable] + internal class SerializableTestResult : ITestResult + { + public TestResultState resultState; + public string message; + public bool executed; + public string name; + public string fullName; + public string id; + public bool isSuccess; + public double duration; + public string stackTrace; + public bool isIgnored; + + public TestResultState ResultState + { + get { return resultState; } + } + + public string Message + { + get { return message; } + } + + public string Logs + { + get { return null; } + } + + public bool Executed + { + get { return executed; } + } + + public string Name + { + get { return name; } + } + + public string FullName + { + get { return fullName; } + } + + public string Id + { + get { return id; } + } + + public bool IsSuccess + { + get { return isSuccess; } + } + + public double Duration + { + get { return duration; } + } + + public string StackTrace + { + get { return stackTrace; } + } + + public bool IsIgnored + { + get { return isIgnored; } + } + } + #endregion +} diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/ResultDTO.cs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/ResultDTO.cs.meta new file mode 100644 index 0000000..e34e61f --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/ResultDTO.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 37c772b6d1ba4274aa96c83710cb27e8 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestComponent.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestComponent.cs new file mode 100644 index 0000000..542c58c --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestComponent.cs @@ -0,0 +1,412 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using UnityEngine; +using UnityEngine.SceneManagement; + +#if UNITY_EDITOR +using UnityEditor; +#endif + +namespace UnityTest +{ + public interface ITestComponent : IComparable + { + void EnableTest(bool enable); + bool IsTestGroup(); + GameObject gameObject { get; } + string Name { get; } + ITestComponent GetTestGroup(); + bool IsExceptionExpected(string exceptionType); + bool ShouldSucceedOnException(); + double GetTimeout(); + bool IsIgnored(); + bool ShouldSucceedOnAssertions(); + bool IsExludedOnThisPlatform(); + } + + public class TestComponent : MonoBehaviour, ITestComponent + { + public static ITestComponent NullTestComponent = new NullTestComponentImpl(); + + public float timeout = 5; + public bool ignored = false; + public bool succeedAfterAllAssertionsAreExecuted = false; + public bool expectException = false; + public string expectedExceptionList = ""; + public bool succeedWhenExceptionIsThrown = false; + public IncludedPlatforms includedPlatforms = (IncludedPlatforms) ~0L; + public string[] platformsToIgnore = null; + + public bool dynamic; + public string dynamicTypeName; + + public bool IsExludedOnThisPlatform() + { + return platformsToIgnore != null && platformsToIgnore.Any(platform => platform == Application.platform.ToString()); + } + + static bool IsAssignableFrom(Type a, Type b) + { +#if !UNITY_METRO + return a.IsAssignableFrom(b); +#else + return false; +#endif + } + + public bool IsExceptionExpected(string exception) + { + exception = exception.Trim(); + if (!expectException) + return false; + if(string.IsNullOrEmpty(expectedExceptionList.Trim())) + return true; + foreach (var expectedException in expectedExceptionList.Split(',').Select(e => e.Trim())) + { + if (exception == expectedException) + return true; + var exceptionType = Type.GetType(exception) ?? GetTypeByName(exception); + var expectedExceptionType = Type.GetType(expectedException) ?? GetTypeByName(expectedException); + if (exceptionType != null && expectedExceptionType != null && IsAssignableFrom(expectedExceptionType, exceptionType)) + return true; + } + return false; + } + + public bool ShouldSucceedOnException() + { + return succeedWhenExceptionIsThrown; + } + + public double GetTimeout() + { + return timeout; + } + + public bool IsIgnored() + { + return ignored; + } + + public bool ShouldSucceedOnAssertions() + { + return succeedAfterAllAssertionsAreExecuted; + } + + private static Type GetTypeByName(string className) + { +#if !UNITY_METRO + return AppDomain.CurrentDomain.GetAssemblies().SelectMany(a => a.GetTypes()).FirstOrDefault(type => type.Name == className); +#else + return null; +#endif + } + + public void OnValidate() + { + if (timeout < 0.01f) timeout = 0.01f; + } + + // Legacy + [Flags] + public enum IncludedPlatforms + { + WindowsEditor = 1 << 0, + OSXEditor = 1 << 1, + WindowsPlayer = 1 << 2, + OSXPlayer = 1 << 3, + LinuxPlayer = 1 << 4, + MetroPlayerX86 = 1 << 5, + MetroPlayerX64 = 1 << 6, + MetroPlayerARM = 1 << 7, + WindowsWebPlayer = 1 << 8, + OSXWebPlayer = 1 << 9, + Android = 1 << 10, +// ReSharper disable once InconsistentNaming + IPhonePlayer = 1 << 11, + TizenPlayer = 1 << 12, + WP8Player = 1 << 13, + BB10Player = 1 << 14, + NaCl = 1 << 15, + PS3 = 1 << 16, + XBOX360 = 1 << 17, + WiiPlayer = 1 << 18, + PSP2 = 1 << 19, + PS4 = 1 << 20, + PSMPlayer = 1 << 21, + XboxOne = 1 << 22, + } + + #region ITestComponent implementation + + public void EnableTest(bool enable) + { + if (enable && dynamic) + { + Type t = Type.GetType(dynamicTypeName); + var s = gameObject.GetComponent(t) as MonoBehaviour; + if (s != null) + DestroyImmediate(s); + + gameObject.AddComponent(t); + } + + if (gameObject.activeSelf != enable) gameObject.SetActive(enable); + } + + public int CompareTo(ITestComponent obj) + { + if (obj == NullTestComponent) + return 1; + var result = gameObject.name.CompareTo(obj.gameObject.name); + if (result == 0) + result = gameObject.GetInstanceID().CompareTo(obj.gameObject.GetInstanceID()); + return result; + } + + public bool IsTestGroup() + { + for (int i = 0; i < gameObject.transform.childCount; i++) + { + var childTc = gameObject.transform.GetChild(i).GetComponent(typeof(TestComponent)); + if (childTc != null) + return true; + } + return false; + } + + public string Name { get { return gameObject == null ? "" : gameObject.name; } } + + public ITestComponent GetTestGroup() + { + var parent = gameObject.transform.parent; + if (parent == null) + return NullTestComponent; + return parent.GetComponent(); + } + + public override bool Equals(object o) + { + if (o is TestComponent) + return this == (o as TestComponent); + return false; + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public static bool operator ==(TestComponent a, TestComponent b) + { + if (ReferenceEquals(a, b)) + return true; + if (((object)a == null) || ((object)b == null)) + return false; + if (a.dynamic && b.dynamic) + return a.dynamicTypeName == b.dynamicTypeName; + if (a.dynamic || b.dynamic) + return false; + return a.gameObject == b.gameObject; + } + + public static bool operator !=(TestComponent a, TestComponent b) + { + return !(a == b); + } + + #endregion + + #region Static helpers + + public static TestComponent CreateDynamicTest(Type type) + { + var go = CreateTest(type.Name); + go.hideFlags |= HideFlags.DontSave; + go.SetActive(false); + + var tc = go.GetComponent(); + tc.dynamic = true; + tc.dynamicTypeName = type.AssemblyQualifiedName; + +#if !UNITY_METRO + foreach (var typeAttribute in type.GetCustomAttributes(false)) + { + if (typeAttribute is IntegrationTest.TimeoutAttribute) + tc.timeout = (typeAttribute as IntegrationTest.TimeoutAttribute).timeout; + else if (typeAttribute is IntegrationTest.IgnoreAttribute) + tc.ignored = true; + else if (typeAttribute is IntegrationTest.SucceedWithAssertions) + tc.succeedAfterAllAssertionsAreExecuted = true; + else if (typeAttribute is IntegrationTest.ExcludePlatformAttribute) + tc.platformsToIgnore = (typeAttribute as IntegrationTest.ExcludePlatformAttribute).platformsToExclude; + else if (typeAttribute is IntegrationTest.ExpectExceptions) + { + var attribute = (typeAttribute as IntegrationTest.ExpectExceptions); + tc.expectException = true; + tc.expectedExceptionList = string.Join(",", attribute.exceptionTypeNames); + tc.succeedWhenExceptionIsThrown = attribute.succeedOnException; + } + } + go.AddComponent(type); +#endif // if !UNITY_METRO + return tc; + } + + public static GameObject CreateTest() + { + return CreateTest("New Test"); + } + + private static GameObject CreateTest(string name) + { + var go = new GameObject(name); + go.AddComponent(); +#if UNITY_EDITOR + Undo.RegisterCreatedObjectUndo(go, "Created test"); +#endif + return go; + } + + public static List FindAllTestsOnScene() + { + var tests = Resources.FindObjectsOfTypeAll (typeof(TestComponent)).Cast (); +#if UNITY_EDITOR + tests = tests.Where( t => {var p = PrefabUtility.GetPrefabType(t); return p != PrefabType.Prefab && p != PrefabType.ModelPrefab;} ); + +#endif + return tests.ToList (); + } + + public static List FindAllTopTestsOnScene() + { + return FindAllTestsOnScene().Where(component => component.gameObject.transform.parent == null).ToList(); + } + + public static List FindAllDynamicTestsOnScene() + { + return FindAllTestsOnScene().Where(t => t.dynamic).ToList(); + } + + public static void DestroyAllDynamicTests() + { + foreach (var dynamicTestComponent in FindAllDynamicTestsOnScene()) + DestroyImmediate(dynamicTestComponent.gameObject); + } + + public static void DisableAllTests() + { + foreach (var t in FindAllTestsOnScene()) t.EnableTest(false); + } + + public static bool AnyTestsOnScene() + { + return FindAllTestsOnScene().Any(); + } + + public static bool AnyDynamicTestForCurrentScene() + { +#if UNITY_EDITOR + return TestComponent.GetTypesWithHelpAttribute(SceneManager.GetActiveScene().name).Any(); +#else + return TestComponent.GetTypesWithHelpAttribute(SceneManager.GetActiveScene().name).Any(); +#endif + } + + #endregion + + private sealed class NullTestComponentImpl : ITestComponent + { + public int CompareTo(ITestComponent other) + { + if (other == this) return 0; + return -1; + } + + public void EnableTest(bool enable) + { + } + + public bool IsTestGroup() + { + throw new NotImplementedException(); + } + + public GameObject gameObject { get; private set; } + public string Name { get { return ""; } } + + public ITestComponent GetTestGroup() + { + return null; + } + + public bool IsExceptionExpected(string exceptionType) + { + throw new NotImplementedException(); + } + + public bool ShouldSucceedOnException() + { + throw new NotImplementedException(); + } + + public double GetTimeout() + { + throw new NotImplementedException(); + } + + public bool IsIgnored() + { + throw new NotImplementedException(); + } + + public bool ShouldSucceedOnAssertions() + { + throw new NotImplementedException(); + } + + public bool IsExludedOnThisPlatform() + { + throw new NotImplementedException(); + } + } + + public static IEnumerable GetTypesWithHelpAttribute(string sceneName) + { +#if !UNITY_METRO + foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies()) + { + Type[] types = null; + + try + { + types = assembly.GetTypes(); + } + catch (ReflectionTypeLoadException ex) + { + Debug.LogError("Failed to load types from: " + assembly.FullName); + foreach (Exception loadEx in ex.LoaderExceptions) + Debug.LogException(loadEx); + } + + if (types == null) + continue; + + foreach (Type type in types) + { + var attributes = type.GetCustomAttributes(typeof(IntegrationTest.DynamicTestAttribute), true); + if (attributes.Length == 1) + { + var a = attributes.Single() as IntegrationTest.DynamicTestAttribute; + if (a.IncludeOnScene(sceneName)) yield return type; + } + } + } +#else // if !UNITY_METRO + yield break; +#endif // if !UNITY_METRO + } + } +} diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestComponent.cs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestComponent.cs.meta new file mode 100644 index 0000000..fd67c93 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestComponent.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b1dba0b27b0864740a8720e920aa88c0 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestResult.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestResult.cs new file mode 100644 index 0000000..df67f71 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestResult.cs @@ -0,0 +1,141 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace UnityTest +{ + [Serializable] + public class TestResult : ITestResult, IComparable + { + private readonly GameObject m_Go; + private string m_Name; + public ResultType resultType = ResultType.NotRun; + public double duration; + public string messages; + public string stacktrace; + public string id; + public bool dynamicTest; + + public TestComponent TestComponent; + + public GameObject GameObject + { + get { return m_Go; } + } + + public TestResult(TestComponent testComponent) + { + TestComponent = testComponent; + m_Go = testComponent.gameObject; + id = testComponent.gameObject.GetInstanceID().ToString(); + dynamicTest = testComponent.dynamic; + + if (m_Go != null) m_Name = m_Go.name; + + if (dynamicTest) + id = testComponent.dynamicTypeName; + } + + public void Update(TestResult oldResult) + { + resultType = oldResult.resultType; + duration = oldResult.duration; + messages = oldResult.messages; + stacktrace = oldResult.stacktrace; + } + + public enum ResultType + { + Success, + Failed, + Timeout, + NotRun, + FailedException, + Ignored + } + + public void Reset() + { + resultType = ResultType.NotRun; + duration = 0f; + messages = ""; + stacktrace = ""; + } + + #region ITestResult implementation + public TestResultState ResultState { + get + { + switch (resultType) + { + case ResultType.Success: return TestResultState.Success; + case ResultType.Failed: return TestResultState.Failure; + case ResultType.FailedException: return TestResultState.Error; + case ResultType.Ignored: return TestResultState.Ignored; + case ResultType.NotRun: return TestResultState.Skipped; + case ResultType.Timeout: return TestResultState.Cancelled; + default: throw new Exception(); + } + } + } + public string Message { get { return messages; } } + public string Logs { get { return null; } } + public bool Executed { get { return resultType != ResultType.NotRun; } } + public string Name { get { if (m_Go != null) m_Name = m_Go.name; return m_Name; } } + public string Id { get { return id; } } + public bool IsSuccess { get { return resultType == ResultType.Success; } } + public bool IsTimeout { get { return resultType == ResultType.Timeout; } } + public double Duration { get { return duration; } } + public string StackTrace { get { return stacktrace; } } + public string FullName { + get + { + var fullName = Name; + if (m_Go != null) + { + var tempGo = m_Go.transform.parent; + while (tempGo != null) + { + fullName = tempGo.name + "." + fullName; + tempGo = tempGo.transform.parent; + } + } + return fullName; + } + } + + public bool IsIgnored { get { return resultType == ResultType.Ignored; } } + public bool IsFailure + { + get + { + return resultType == ResultType.Failed + || resultType == ResultType.FailedException + || resultType == ResultType.Timeout; + } + } + #endregion + + #region IComparable, GetHashCode and Equals implementation + public override int GetHashCode() + { + return id.GetHashCode(); + } + + public int CompareTo(TestResult other) + { + var result = Name.CompareTo(other.Name); + if (result == 0) + result = m_Go.GetInstanceID().CompareTo(other.m_Go.GetInstanceID()); + return result; + } + + public override bool Equals(object obj) + { + if (obj is TestResult) + return GetHashCode() == obj.GetHashCode(); + return base.Equals(obj); + } + #endregion + } +} diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestResult.cs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestResult.cs.meta new file mode 100644 index 0000000..c604bea --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestResult.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 68740a702763aaa4594e8319a05ae0d3 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestResultRenderer.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestResultRenderer.cs new file mode 100644 index 0000000..e838d7e --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestResultRenderer.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; + +public class TestResultRenderer +{ + private static class Styles + { + public static readonly GUIStyle SucceedLabelStyle; + public static readonly GUIStyle FailedLabelStyle; + public static readonly GUIStyle FailedMessagesStyle; + + static Styles() + { + SucceedLabelStyle = new GUIStyle("label"); + SucceedLabelStyle.normal.textColor = Color.green; + SucceedLabelStyle.fontSize = 48; + + FailedLabelStyle = new GUIStyle("label"); + FailedLabelStyle.normal.textColor = Color.red; + FailedLabelStyle.fontSize = 32; + + FailedMessagesStyle = new GUIStyle("label"); + FailedMessagesStyle.wordWrap = false; + FailedMessagesStyle.richText = true; + } + } + private readonly Dictionary> m_TestCollection = new Dictionary>(); + + private bool m_ShowResults; + Vector2 m_ScrollPosition; + private int m_FailureCount; + + public void ShowResults() + { + m_ShowResults = true; + Cursor.visible = true; + } + + public void AddResults(string sceneName, ITestResult result) + { + if (!m_TestCollection.ContainsKey(sceneName)) + m_TestCollection.Add(sceneName, new List()); + m_TestCollection[sceneName].Add(result); + if (result.Executed && !result.IsSuccess) + m_FailureCount++; + } + + public void Draw() + { + if (!m_ShowResults) return; + if (m_TestCollection.Count == 0) + { + GUILayout.Label("All test succeeded", Styles.SucceedLabelStyle, GUILayout.Width(600)); + } + else + { + int count = m_TestCollection.Sum (testGroup => testGroup.Value.Count); + GUILayout.Label(count + " tests failed!", Styles.FailedLabelStyle); + + m_ScrollPosition = GUILayout.BeginScrollView(m_ScrollPosition, GUILayout.ExpandWidth(true)); + var text = ""; + foreach (var testGroup in m_TestCollection) + { + text += "" + testGroup.Key + "\n"; + text += string.Join("\n", testGroup.Value + .Where(result => !result.IsSuccess) + .Select(result => result.Name + " " + result.ResultState + "\n" + result.Message) + .ToArray()); + } + GUILayout.TextArea(text, Styles.FailedMessagesStyle); + GUILayout.EndScrollView(); + } + if (GUILayout.Button("Close")) + Application.Quit(); + } + + public int FailureCount() + { + return m_FailureCount; + } +} diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestResultRenderer.cs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestResultRenderer.cs.meta new file mode 100644 index 0000000..7d70150 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestResultRenderer.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7ae9d3b4b57cae343b7ff360f9deb628 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestRunner.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestRunner.cs new file mode 100644 index 0000000..9c64a2f --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestRunner.cs @@ -0,0 +1,432 @@ +// #define IMITATE_BATCH_MODE //uncomment if you want to imitate batch mode behaviour in non-batch mode mode run + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using UnityEngine; +using UnityTest.IntegrationTestRunner; +using System.IO; +using UnityEngine.SceneManagement; + +namespace UnityTest +{ + [Serializable] + public class TestRunner : MonoBehaviour + { + static private int TestSceneNumber = 0; + static private readonly TestResultRenderer k_ResultRenderer = new TestResultRenderer(); + + public TestComponent currentTest; + private List m_ResultList = new List(); + private List m_TestComponents; + + public bool isInitializedByRunner + { + get + { +#if !IMITATE_BATCH_MODE + if (Application.isEditor && !IsBatchMode()) + return true; +#endif + return false; + } + } + + private double m_StartTime; + private bool m_ReadyToRun; + + private string m_TestMessages; + private string m_Stacktrace; + private TestState m_TestState = TestState.Running; + + private TestRunnerConfigurator m_Configurator; + + public TestRunnerCallbackList TestRunnerCallback = new TestRunnerCallbackList(); + private IntegrationTestsProvider m_TestsProvider; + + private const string k_Prefix = "IntegrationTest"; + private const string k_StartedMessage = k_Prefix + " Started"; + private const string k_FinishedMessage = k_Prefix + " Finished"; + private const string k_TimeoutMessage = k_Prefix + " Timeout"; + private const string k_FailedMessage = k_Prefix + " Failed"; + private const string k_FailedExceptionMessage = k_Prefix + " Failed with exception"; + private const string k_IgnoredMessage = k_Prefix + " Ignored"; + private const string k_InterruptedMessage = k_Prefix + " Run interrupted"; + + + public void Awake() + { + m_Configurator = new TestRunnerConfigurator(); + if (isInitializedByRunner) return; + TestComponent.DisableAllTests(); + } + + public void Start() + { + if (isInitializedByRunner) return; + + if (m_Configurator.sendResultsOverNetwork) + { + var nrs = m_Configurator.ResolveNetworkConnection(); + if (nrs != null) + TestRunnerCallback.Add(nrs); + } + + TestComponent.DestroyAllDynamicTests(); + var dynamicTestTypes = TestComponent.GetTypesWithHelpAttribute(SceneManager.GetActiveScene().name); + foreach (var dynamicTestType in dynamicTestTypes) + TestComponent.CreateDynamicTest(dynamicTestType); + + var tests = TestComponent.FindAllTestsOnScene(); + + InitRunner(tests, dynamicTestTypes.Select(type => type.AssemblyQualifiedName).ToList()); + } + + public void InitRunner(List tests, List dynamicTestsToRun) + { + Application.logMessageReceived += LogHandler; + + // Init dynamic tests + foreach (var typeName in dynamicTestsToRun) + { + var t = Type.GetType(typeName); + if (t == null) continue; + var scriptComponents = Resources.FindObjectsOfTypeAll(t) as MonoBehaviour[]; + if (scriptComponents.Length == 0) + { + Debug.LogWarning(t + " not found. Skipping."); + continue; + } + if (scriptComponents.Length > 1) Debug.LogWarning("Multiple GameObjects refer to " + typeName); + tests.Add(scriptComponents.First().GetComponent()); + } + // create test structure + m_TestComponents = ParseListForGroups(tests).ToList(); + // create results for tests + m_ResultList = m_TestComponents.Select(component => new TestResult(component)).ToList(); + // init test provider + m_TestsProvider = new IntegrationTestsProvider(m_ResultList.Select(result => result.TestComponent as ITestComponent)); + m_ReadyToRun = true; + } + + private static IEnumerable ParseListForGroups(IEnumerable tests) + { + var results = new HashSet(); + foreach (var testResult in tests) + { + if (testResult.IsTestGroup()) + { + var childrenTestResult = testResult.gameObject.GetComponentsInChildren(typeof(TestComponent), true) + .Where(t => t != testResult) + .Cast() + .ToArray(); + foreach (var result in childrenTestResult) + { + if (!result.IsTestGroup()) + results.Add(result); + } + continue; + } + results.Add(testResult); + } + return results; + } + + public void Update() + { + if (m_ReadyToRun && Time.frameCount > 1) + { + m_ReadyToRun = false; + StartCoroutine("StateMachine"); + } + } + + public void OnDestroy() + { + if (currentTest != null) + { + var testResult = m_ResultList.Single(result => result.TestComponent == currentTest); + testResult.messages += "Test run interrupted (crash?)"; + LogMessage(k_InterruptedMessage); + FinishTest(TestResult.ResultType.Failed); + } + if (currentTest != null || (m_TestsProvider != null && m_TestsProvider.AnyTestsLeft())) + { + var remainingTests = m_TestsProvider.GetRemainingTests(); + TestRunnerCallback.TestRunInterrupted(remainingTests.ToList()); + } + Application.logMessageReceived -= LogHandler; + } + + private void LogHandler(string condition, string stacktrace, LogType type) + { + if (!condition.StartsWith(k_StartedMessage) && !condition.StartsWith(k_FinishedMessage)) + { + var msg = condition; + if (msg.StartsWith(k_Prefix)) msg = msg.Substring(k_Prefix.Length + 1); + if (currentTest != null && msg.EndsWith("(" + currentTest.name + ')')) msg = msg.Substring(0, msg.LastIndexOf('(')); + m_TestMessages += msg + "\n"; + } + switch (type) + { + case LogType.Exception: + { + var exceptionType = condition.Substring(0, condition.IndexOf(':')); + if (currentTest != null && currentTest.IsExceptionExpected(exceptionType)) + { + m_TestMessages += exceptionType + " was expected\n"; + if (currentTest.ShouldSucceedOnException()) + { + m_TestState = TestState.Success; + } + } + else + { + m_TestState = TestState.Exception; + m_Stacktrace = stacktrace; + } + } + break; + case LogType.Assert: + case LogType.Error: + m_TestState = TestState.Failure; + m_Stacktrace = stacktrace; + break; + case LogType.Log: + if (m_TestState == TestState.Running && condition.StartsWith(IntegrationTest.passMessage)) + { + m_TestState = TestState.Success; + } + if (condition.StartsWith(IntegrationTest.failMessage)) + { + m_TestState = TestState.Failure; + } + break; + } + } + + public IEnumerator StateMachine() + { + TestRunnerCallback.RunStarted(Application.platform.ToString(), m_TestComponents); + while (true) + { + if (!m_TestsProvider.AnyTestsLeft() && currentTest == null) + { + FinishTestRun(); + yield break; + } + if (currentTest == null) + { + StartNewTest(); + } + if (currentTest != null) + { + if (m_TestState == TestState.Running) + { + if(currentTest.ShouldSucceedOnAssertions()) + { + var assertionsToCheck = currentTest.gameObject.GetComponentsInChildren().Where(a => a.enabled).ToArray(); + if (assertionsToCheck.Any () && assertionsToCheck.All(a => a.checksPerformed > 0)) + { + IntegrationTest.Pass(currentTest.gameObject); + m_TestState = TestState.Success; + } + } + if (currentTest != null && Time.time > m_StartTime + currentTest.GetTimeout()) + { + m_TestState = TestState.Timeout; + } + } + + switch (m_TestState) + { + case TestState.Success: + LogMessage(k_FinishedMessage); + FinishTest(TestResult.ResultType.Success); + break; + case TestState.Failure: + LogMessage(k_FailedMessage); + FinishTest(TestResult.ResultType.Failed); + break; + case TestState.Exception: + LogMessage(k_FailedExceptionMessage); + FinishTest(TestResult.ResultType.FailedException); + break; + case TestState.Timeout: + LogMessage(k_TimeoutMessage); + FinishTest(TestResult.ResultType.Timeout); + break; + case TestState.Ignored: + LogMessage(k_IgnoredMessage); + FinishTest(TestResult.ResultType.Ignored); + break; + } + } + yield return null; + } + } + + private void LogMessage(string message) + { + if (currentTest != null) + Debug.Log(message + " (" + currentTest.Name + ")", currentTest.gameObject); + else + Debug.Log(message); + } + + private void FinishTestRun() + { + PrintResultToLog(); + TestRunnerCallback.RunFinished(m_ResultList); + LoadNextLevelOrQuit(); + } + + private void PrintResultToLog() + { + var resultString = ""; + resultString += "Passed: " + m_ResultList.Count(t => t.IsSuccess); + if (m_ResultList.Any(result => result.IsFailure)) + { + resultString += " Failed: " + m_ResultList.Count(t => t.IsFailure); + Debug.Log("Failed tests: " + string.Join(", ", m_ResultList.Where(t => t.IsFailure).Select(result => result.Name).ToArray())); + } + if (m_ResultList.Any(result => result.IsIgnored)) + { + resultString += " Ignored: " + m_ResultList.Count(t => t.IsIgnored); + Debug.Log("Ignored tests: " + string.Join(", ", + m_ResultList.Where(t => t.IsIgnored).Select(result => result.Name).ToArray())); + } + Debug.Log(resultString); + } + + private void LoadNextLevelOrQuit() + { + if (isInitializedByRunner) return; + + + TestSceneNumber += 1; + string testScene = m_Configurator.GetIntegrationTestScenes(TestSceneNumber); + + if (testScene != null) + SceneManager.LoadScene(Path.GetFileNameWithoutExtension(testScene)); + else + { + TestRunnerCallback.AllScenesFinished(); + k_ResultRenderer.ShowResults(); + +#if UNITY_EDITOR + var prevScenes = m_Configurator.GetPreviousScenesToRestore(); + if(prevScenes!=null) + { + UnityEditor.EditorBuildSettings.scenes = prevScenes; + } +#endif + + if (m_Configurator.isBatchRun && m_Configurator.sendResultsOverNetwork) + Application.Quit(); + } + } + + public void OnGUI() + { + k_ResultRenderer.Draw(); + } + + private void StartNewTest() + { + m_TestMessages = ""; + m_Stacktrace = ""; + m_TestState = TestState.Running; + + m_StartTime = Time.time; + currentTest = m_TestsProvider.GetNextTest() as TestComponent; + + var testResult = m_ResultList.Single(result => result.TestComponent == currentTest); + + if (currentTest != null && currentTest.IsExludedOnThisPlatform()) + { + m_TestState = TestState.Ignored; + Debug.Log(currentTest.gameObject.name + " is excluded on this platform"); + } + + // don't ignore test if user initiated it from the runner and it's the only test that is being run + if (currentTest != null + && (currentTest.IsIgnored() + && !(isInitializedByRunner && m_ResultList.Count == 1))) + m_TestState = TestState.Ignored; + + LogMessage(k_StartedMessage); + TestRunnerCallback.TestStarted(testResult); + } + + private void FinishTest(TestResult.ResultType result) + { + m_TestsProvider.FinishTest(currentTest); + var testResult = m_ResultList.Single(t => t.GameObject == currentTest.gameObject); + testResult.resultType = result; + testResult.duration = Time.time - m_StartTime; + testResult.messages = m_TestMessages; + testResult.stacktrace = m_Stacktrace; + TestRunnerCallback.TestFinished(testResult); + currentTest = null; + if (!testResult.IsSuccess + && testResult.Executed + && !testResult.IsIgnored) k_ResultRenderer.AddResults(SceneManager.GetActiveScene().name, testResult); + } + + #region Test Runner Helpers + + public static TestRunner GetTestRunner() + { + TestRunner testRunnerComponent = null; + var testRunnerComponents = Resources.FindObjectsOfTypeAll(typeof(TestRunner)); + + if (testRunnerComponents.Count() > 1) + foreach (var t in testRunnerComponents) DestroyImmediate(((TestRunner)t).gameObject); + else if (!testRunnerComponents.Any()) + testRunnerComponent = Create().GetComponent(); + else + testRunnerComponent = testRunnerComponents.Single() as TestRunner; + + return testRunnerComponent; + } + + private static GameObject Create() + { + var runner = new GameObject("TestRunner"); + runner.AddComponent(); + Debug.Log("Created Test Runner"); + return runner; + } + + private static bool IsBatchMode() + { +#if !UNITY_METRO + const string internalEditorUtilityClassName = "UnityEditorInternal.InternalEditorUtility, UnityEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"; + + var t = Type.GetType(internalEditorUtilityClassName, false); + if (t == null) return false; + + const string inBatchModeProperty = "inBatchMode"; + var prop = t.GetProperty(inBatchModeProperty); + return (bool)prop.GetValue(null, null); +#else // if !UNITY_METRO + return false; +#endif // if !UNITY_METRO + } + + #endregion + + enum TestState + { + Running, + Success, + Failure, + Exception, + Timeout, + Ignored + } + } +} diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestRunner.cs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestRunner.cs.meta new file mode 100644 index 0000000..5ef068e --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestRunner.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5c3afc1c624179749bcdecf7b0224902 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestRunnerCallbackList.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestRunnerCallbackList.cs new file mode 100644 index 0000000..91830d2 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestRunnerCallbackList.cs @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace UnityTest.IntegrationTestRunner +{ + public class TestRunnerCallbackList : ITestRunnerCallback + { + private readonly List m_CallbackList = new List(); + + public void Add(ITestRunnerCallback callback) + { + m_CallbackList.Add(callback); + } + + public void Remove(ITestRunnerCallback callback) + { + m_CallbackList.Remove(callback); + } + + public void RunStarted(string platform, List testsToRun) + { + foreach (var unitTestRunnerCallback in m_CallbackList) + { + unitTestRunnerCallback.RunStarted(platform, testsToRun); + } + } + + public void RunFinished(List testResults) + { + foreach (var unitTestRunnerCallback in m_CallbackList) + { + unitTestRunnerCallback.RunFinished(testResults); + } + } + + public void AllScenesFinished() + { + foreach (var unitTestRunnerCallback in m_CallbackList) + { + unitTestRunnerCallback.AllScenesFinished(); + } + } + + public void TestStarted(TestResult test) + { + foreach (var unitTestRunnerCallback in m_CallbackList) + { + unitTestRunnerCallback.TestStarted(test); + } + } + + public void TestFinished(TestResult test) + { + foreach (var unitTestRunnerCallback in m_CallbackList) + { + unitTestRunnerCallback.TestFinished(test); + } + } + + public void TestRunInterrupted(List testsNotRun) + { + foreach (var unitTestRunnerCallback in m_CallbackList) + { + unitTestRunnerCallback.TestRunInterrupted(testsNotRun); + } + } + } +} diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestRunnerCallbackList.cs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestRunnerCallbackList.cs.meta new file mode 100644 index 0000000..c39656a --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestRunnerCallbackList.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7729da83f7c08d244b5788c870a93780 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestRunnerConfigurator.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestRunnerConfigurator.cs new file mode 100644 index 0000000..b0b270d --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestRunnerConfigurator.cs @@ -0,0 +1,227 @@ +#if !UNITY_METRO && !UNITY_WEBPLAYER && (UNITY_PRO_LICENSE || !(UNITY_ANDROID || UNITY_IPHONE)) +#define UTT_SOCKETS_SUPPORTED +#endif +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using UnityEngine; +using UnityTest.IntegrationTestRunner; +#if UTT_SOCKETS_SUPPORTED +using System.Net; +using System.Net.Sockets; +using System.Net.NetworkInformation; +#endif + +#if UNITY_EDITOR +using UnityEditorInternal; +#endif + +namespace UnityTest +{ + public class TestRunnerConfigurator + { + public static string integrationTestsNetwork = "networkconfig.txt"; + public static string batchRunFileMarker = "batchrun.txt"; + public static string testScenesToRun = "testscenes.txt"; + public static string previousScenes = "previousScenes.txt"; + + public bool isBatchRun { get; private set; } + + public bool sendResultsOverNetwork { get; private set; } + +#if UTT_SOCKETS_SUPPORTED + private readonly List m_IPEndPointList = new List(); +#endif + + public TestRunnerConfigurator() + { + CheckForBatchMode(); + CheckForSendingResultsOverNetwork(); + } + +#if UNITY_EDITOR + public UnityEditor.EditorBuildSettingsScene[] GetPreviousScenesToRestore() + { + string text = null; + if (Application.isEditor) + { + text = GetTextFromTempFile(previousScenes); + } + + if(text != null) + { + var serializer = new System.Xml.Serialization.XmlSerializer(typeof(UnityEditor.EditorBuildSettingsScene[])); + using(var textReader = new StringReader(text)) + { + try + { + return (UnityEditor.EditorBuildSettingsScene[] )serializer.Deserialize(textReader); + } + catch (System.Xml.XmlException) + { + return null; + } + } + } + + return null; + } +#endif + + public string GetIntegrationTestScenes(int testSceneNum) + { + string text; + if (Application.isEditor) + text = GetTextFromTempFile(testScenesToRun); + else + text = GetTextFromTextAsset(testScenesToRun); + + List sceneList = new List(); + foreach (var line in text.Split(new[] {'\n'}, StringSplitOptions.RemoveEmptyEntries)) + { + sceneList.Add(line.ToString()); + } + + if (testSceneNum < sceneList.Count) + return sceneList.ElementAt(testSceneNum); + else + return null; + } + + private void CheckForSendingResultsOverNetwork() + { +#if UTT_SOCKETS_SUPPORTED + string text; + if (Application.isEditor) + text = GetTextFromTempFile(integrationTestsNetwork); + else + text = GetTextFromTextAsset(integrationTestsNetwork); + + if (text == null) return; + + sendResultsOverNetwork = true; + + m_IPEndPointList.Clear(); + + foreach (var line in text.Split(new[] {'\n'}, StringSplitOptions.RemoveEmptyEntries)) + { + var idx = line.IndexOf(':'); + if (idx == -1) throw new Exception(line); + var ip = line.Substring(0, idx); + var port = line.Substring(idx + 1); + m_IPEndPointList.Add(new IPEndPoint(IPAddress.Parse(ip), Int32.Parse(port))); + } +#endif // if UTT_SOCKETS_SUPPORTED + } + + private static string GetTextFromTextAsset(string fileName) + { + var nameWithoutExtension = fileName.Substring(0, fileName.LastIndexOf('.')); + var resultpathFile = Resources.Load(nameWithoutExtension) as TextAsset; + return resultpathFile != null ? resultpathFile.text : null; + } + + private static string GetTextFromTempFile(string fileName) + { + string text = null; + try + { +#if UNITY_EDITOR && !UNITY_WEBPLAYER + text = File.ReadAllText(Path.Combine("Temp", fileName)); +#endif + } + catch + { + return null; + } + return text; + } + + private void CheckForBatchMode() + { +#if IMITATE_BATCH_MODE + isBatchRun = true; +#elif UNITY_EDITOR + if (Application.isEditor && InternalEditorUtility.inBatchMode) + isBatchRun = true; +#else + if (GetTextFromTextAsset(batchRunFileMarker) != null) isBatchRun = true; +#endif + } + + public static List GetAvailableNetworkIPs() + { +#if UTT_SOCKETS_SUPPORTED + if (!NetworkInterface.GetIsNetworkAvailable()) + return new List{IPAddress.Loopback.ToString()}; + + var ipList = new List(); + var allIpsList = new List(); + + foreach (var netInterface in NetworkInterface.GetAllNetworkInterfaces()) + { + if (netInterface.NetworkInterfaceType != NetworkInterfaceType.Wireless80211 && + netInterface.NetworkInterfaceType != NetworkInterfaceType.Ethernet) + continue; + + var ipAdresses = netInterface.GetIPProperties().UnicastAddresses + .Where(a => a.Address.AddressFamily == AddressFamily.InterNetwork); + allIpsList.AddRange(ipAdresses); + + if (netInterface.OperationalStatus != OperationalStatus.Up) continue; + + ipList.AddRange(ipAdresses); + } + + //On Mac 10.10 all interfaces return OperationalStatus.Unknown, thus this workaround + if(!ipList.Any()) return allIpsList.Select(i => i.Address.ToString()).ToList(); + + // sort ip list by their masks to predict which ip belongs to lan network + ipList.Sort((ip1, ip2) => + { + var mask1 = BitConverter.ToInt32(ip1.IPv4Mask.GetAddressBytes().Reverse().ToArray(), 0); + var mask2 = BitConverter.ToInt32(ip2.IPv4Mask.GetAddressBytes().Reverse().ToArray(), 0); + return mask2.CompareTo(mask1); + }); + if (ipList.Count == 0) + return new List { IPAddress.Loopback.ToString() }; + return ipList.Select(i => i.Address.ToString()).ToList(); +#else + return new List(); +#endif // if UTT_SOCKETS_SUPPORTED + } + + public ITestRunnerCallback ResolveNetworkConnection() + { +#if UTT_SOCKETS_SUPPORTED + var nrsList = m_IPEndPointList.Select(ipEndPoint => new NetworkResultSender(ipEndPoint.Address.ToString(), ipEndPoint.Port)).ToList(); + + var timeout = TimeSpan.FromSeconds(30); + DateTime startTime = DateTime.Now; + while ((DateTime.Now - startTime) < timeout) + { + foreach (var networkResultSender in nrsList) + { + try + { + if (!networkResultSender.Ping()) continue; + } + catch (Exception e) + { + Debug.LogException(e); + sendResultsOverNetwork = false; + return null; + } + return networkResultSender; + } + Thread.Sleep(500); + } + Debug.LogError("Couldn't connect to the server: " + string.Join(", ", m_IPEndPointList.Select(ipep => ipep.Address + ":" + ipep.Port).ToArray())); + sendResultsOverNetwork = false; +#endif // if UTT_SOCKETS_SUPPORTED + return null; + } + } +} diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestRunnerConfigurator.cs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestRunnerConfigurator.cs.meta new file mode 100644 index 0000000..42f7263 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestRunnerConfigurator.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 05aae864572254e478ed2f0489cdd335 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets.meta new file mode 100644 index 0000000..433c295 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 1d1ccbd729921544dbd71f7e80c405b6 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CallTesting.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CallTesting.cs new file mode 100644 index 0000000..3badc58 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CallTesting.cs @@ -0,0 +1,204 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace UnityTest +{ + public class CallTesting : MonoBehaviour + { + public enum Functions + { + CallAfterSeconds, + CallAfterFrames, + Start, + Update, + FixedUpdate, + LateUpdate, + OnDestroy, + OnEnable, + OnDisable, + OnControllerColliderHit, + OnParticleCollision, + OnJointBreak, + OnBecameInvisible, + OnBecameVisible, + OnTriggerEnter, + OnTriggerExit, + OnTriggerStay, + OnCollisionEnter, + OnCollisionExit, + OnCollisionStay, + OnTriggerEnter2D, + OnTriggerExit2D, + OnTriggerStay2D, + OnCollisionEnter2D, + OnCollisionExit2D, + OnCollisionStay2D, + } + + public enum Method + { + Pass, + Fail + } + + public int afterFrames = 0; + public float afterSeconds = 0.0f; + public Functions callOnMethod = Functions.Start; + + public Method methodToCall; + private int m_StartFrame; + private float m_StartTime; + + private void TryToCallTesting(Functions invokingMethod) + { + if (invokingMethod == callOnMethod) + { + if (methodToCall == Method.Pass) + IntegrationTest.Pass(gameObject); + else + IntegrationTest.Fail(gameObject); + + afterFrames = 0; + afterSeconds = 0.0f; + m_StartTime = float.PositiveInfinity; + m_StartFrame = int.MinValue; + } + } + + public void Start() + { + m_StartTime = Time.time; + m_StartFrame = afterFrames; + TryToCallTesting(Functions.Start); + } + + public void Update() + { + TryToCallTesting(Functions.Update); + CallAfterSeconds(); + CallAfterFrames(); + } + + private void CallAfterFrames() + { + if (afterFrames > 0 && (m_StartFrame + afterFrames) <= Time.frameCount) + TryToCallTesting(Functions.CallAfterFrames); + } + + private void CallAfterSeconds() + { + if ((m_StartTime + afterSeconds) <= Time.time) + TryToCallTesting(Functions.CallAfterSeconds); + } + + public void OnDisable() + { + TryToCallTesting(Functions.OnDisable); + } + + public void OnEnable() + { + TryToCallTesting(Functions.OnEnable); + } + + public void OnDestroy() + { + TryToCallTesting(Functions.OnDestroy); + } + + public void FixedUpdate() + { + TryToCallTesting(Functions.FixedUpdate); + } + + public void LateUpdate() + { + TryToCallTesting(Functions.LateUpdate); + } + + public void OnControllerColliderHit() + { + TryToCallTesting(Functions.OnControllerColliderHit); + } + + public void OnParticleCollision() + { + TryToCallTesting(Functions.OnParticleCollision); + } + + public void OnJointBreak() + { + TryToCallTesting(Functions.OnJointBreak); + } + + public void OnBecameInvisible() + { + TryToCallTesting(Functions.OnBecameInvisible); + } + + public void OnBecameVisible() + { + TryToCallTesting(Functions.OnBecameVisible); + } + + public void OnTriggerEnter() + { + TryToCallTesting(Functions.OnTriggerEnter); + } + + public void OnTriggerExit() + { + TryToCallTesting(Functions.OnTriggerExit); + } + + public void OnTriggerStay() + { + TryToCallTesting(Functions.OnTriggerStay); + } + public void OnCollisionEnter() + { + TryToCallTesting(Functions.OnCollisionEnter); + } + + public void OnCollisionExit() + { + TryToCallTesting(Functions.OnCollisionExit); + } + + public void OnCollisionStay() + { + TryToCallTesting(Functions.OnCollisionStay); + } + + public void OnTriggerEnter2D() + { + TryToCallTesting(Functions.OnTriggerEnter2D); + } + + public void OnTriggerExit2D() + { + TryToCallTesting(Functions.OnTriggerExit2D); + } + + public void OnTriggerStay2D() + { + TryToCallTesting(Functions.OnTriggerStay2D); + } + + public void OnCollisionEnter2D() + { + TryToCallTesting(Functions.OnCollisionEnter2D); + } + + public void OnCollisionExit2D() + { + TryToCallTesting(Functions.OnCollisionExit2D); + } + + public void OnCollisionStay2D() + { + TryToCallTesting(Functions.OnCollisionStay2D); + } + } +} diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CallTesting.cs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CallTesting.cs.meta new file mode 100644 index 0000000..91cbde1 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CallTesting.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0d545b1288d5fc74d8e6c961fb67ab18 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CubeCollisionFailure.prefab b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CubeCollisionFailure.prefab new file mode 100644 index 0000000..d8faebf Binary files /dev/null and b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CubeCollisionFailure.prefab differ diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CubeCollisionFailure.prefab.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CubeCollisionFailure.prefab.meta new file mode 100644 index 0000000..777585e --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CubeCollisionFailure.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: d5fc3c3488db1e74689f1fc67c33944a +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CubeCollisionSuccess.prefab b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CubeCollisionSuccess.prefab new file mode 100644 index 0000000..1b7e571 Binary files /dev/null and b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CubeCollisionSuccess.prefab differ diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CubeCollisionSuccess.prefab.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CubeCollisionSuccess.prefab.meta new file mode 100644 index 0000000..73ed474 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CubeCollisionSuccess.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 1228dff762eab21488cfefd42792c37b +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CubeTriggerFailure.prefab b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CubeTriggerFailure.prefab new file mode 100644 index 0000000..1f929e3 Binary files /dev/null and b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CubeTriggerFailure.prefab differ diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CubeTriggerFailure.prefab.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CubeTriggerFailure.prefab.meta new file mode 100644 index 0000000..e04b231 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CubeTriggerFailure.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 616ddafe39e02da4081e56f7f763af3c +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CubeTriggerSuccess.prefab b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CubeTriggerSuccess.prefab new file mode 100644 index 0000000..947a40f Binary files /dev/null and b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CubeTriggerSuccess.prefab differ diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CubeTriggerSuccess.prefab.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CubeTriggerSuccess.prefab.meta new file mode 100644 index 0000000..d16c91a --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CubeTriggerSuccess.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: d940e636fd44be84e9b7e8da46f700ef +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/Materials.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/Materials.meta new file mode 100644 index 0000000..ea98c41 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/Materials.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 8d55f43641ba3c14eaa1156abc0edabd +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/Materials/green.mat b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/Materials/green.mat new file mode 100644 index 0000000..ac8a70c Binary files /dev/null and b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/Materials/green.mat differ diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/Materials/green.mat.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/Materials/green.mat.meta new file mode 100644 index 0000000..2cabfad --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/Materials/green.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 43da3275cd08d41429f56675d70c58df +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/Materials/red.mat b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/Materials/red.mat new file mode 100644 index 0000000..beeafc5 Binary files /dev/null and b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/Materials/red.mat differ diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/Materials/red.mat.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/Materials/red.mat.meta new file mode 100644 index 0000000..90565c1 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/Materials/red.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 03f3b4747259a364b800508ac27e1c17 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/green.png b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/green.png new file mode 100644 index 0000000..f4dcca2 Binary files /dev/null and b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/green.png differ diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/green.png.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/green.png.meta new file mode 100644 index 0000000..2add269 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/green.png.meta @@ -0,0 +1,53 @@ +fileFormatVersion: 2 +guid: 928be703400f4eb48af2f94d55bf3f74 +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + autoDetectMinSpriteSize: 4 + gridPadding: 0 + gridOffsetX: 0 + gridOffsetY: 0 + gridSizeX: 64 + gridSizeY: 64 + spriteExtrude: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteAtlasHint: 0 + spritePixelsToUnits: 100 + generateSpritePolygon: 0 + spritePolygonAlphaCutoff: 254 + spritePolygonDetail: .5 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + spriteFrames: [] + userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/red.png b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/red.png new file mode 100644 index 0000000..8b29b45 Binary files /dev/null and b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/red.png differ diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/red.png.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/red.png.meta new file mode 100644 index 0000000..9cda8d8 --- /dev/null +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/red.png.meta @@ -0,0 +1,53 @@ +fileFormatVersion: 2 +guid: 591632297e74ba34fa4c65d1265d370a +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + autoDetectMinSpriteSize: 4 + gridPadding: 0 + gridOffsetX: 0 + gridOffsetY: 0 + gridSizeX: 64 + gridSizeY: 64 + spriteExtrude: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteAtlasHint: 0 + spritePixelsToUnits: 100 + generateSpritePolygon: 0 + spritePolygonAlphaCutoff: 254 + spritePolygonDetail: .5 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + spriteFrames: [] + userData: diff --git a/Assets/UnityTestTools/LICENSE.txt b/Assets/UnityTestTools/LICENSE.txt new file mode 100644 index 0000000..d8064cd --- /dev/null +++ b/Assets/UnityTestTools/LICENSE.txt @@ -0,0 +1,83 @@ +This software is provided 'as-is', without any express or implied warranty. + + +THE UNITY TEST TOOLS CONTAIN THE FOLLOWING THIRD PARTY LIBRARIES: +NSubstitute Copyright (c) 2009 Anthony Egerton (nsubstitute@delfish.com) and David Tchepak (dave@davesquared.net). All rights reserved. +NUnit Portions Copyright © 2002-2009 Charlie Poole or Copyright © 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov or Copyright © 2000-2002 Philip A. Craig +Cecil Copyright (c) 2008 - 2011, Jb Evain + + + +NSubstitute is open source software, licensed under the BSD License. The modifications made by Unity are available on github. + +Copyright (c) 2009 Anthony Egerton (nsubstitute@delfish.com) and David Tchepak (dave@davesquared.net) +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the names of the copyright holders nor the names of + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +[ http://www.opensource.org/licenses/bsd-license.php ] + + + +NUnit is provided 'as-is', without any express or implied warranty. The modifications made by Unity are available on github. + +Copyright © 2002-2013 Charlie Poole +Copyright © 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov +Copyright © 2000-2002 Philip A. Craig + +This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment (see the following) in the product documentation is required. + +Portions Copyright © 2002-2013 Charlie Poole or Copyright © 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov or Copyright © 2000-2002 Philip A. Craig + +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source distribution. + + + +Cecil is licensed under the MIT/X11. + +Copyright (c) 2008 - 2011, Jb Evain + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/Assets/UnityTestTools/LICENSE.txt.meta b/Assets/UnityTestTools/LICENSE.txt.meta new file mode 100644 index 0000000..6a87d69 --- /dev/null +++ b/Assets/UnityTestTools/LICENSE.txt.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 0d5b4501bf773f349ad95ec34491dc61 +TextScriptImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS.meta b/Assets/UnityTestTools/TESTS.meta new file mode 100644 index 0000000..3e6ed52 --- /dev/null +++ b/Assets/UnityTestTools/TESTS.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 97d3bb60fc2edb94f90369a75c1f57ed +folderAsset: yes +timeCreated: 1493983809 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityTestTools/TESTS/Examples.meta b/Assets/UnityTestTools/TESTS/Examples.meta new file mode 100644 index 0000000..79470e3 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f92dbe9ee0cf30e42b5420201c180113 +folderAsset: yes +timeCreated: 1493986321 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityTestTools/TESTS/Examples/AssertionExample.meta b/Assets/UnityTestTools/TESTS/Examples/AssertionExample.meta new file mode 100644 index 0000000..5fe301a --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/AssertionExample.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 7854431fdc41b744795c7c586a2baa53 +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/AssertionExample/AssertionsExample.unity b/Assets/UnityTestTools/TESTS/Examples/AssertionExample/AssertionsExample.unity new file mode 100644 index 0000000..5ad1f67 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/AssertionExample/AssertionsExample.unity differ diff --git a/Assets/UnityTestTools/TESTS/Examples/AssertionExample/AssertionsExample.unity.meta b/Assets/UnityTestTools/TESTS/Examples/AssertionExample/AssertionsExample.unity.meta new file mode 100644 index 0000000..cb0e54e --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/AssertionExample/AssertionsExample.unity.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 284a2502d0525ad45a00d66cfcaee7b3 +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/AssertionExample/Ball.physicMaterial b/Assets/UnityTestTools/TESTS/Examples/AssertionExample/Ball.physicMaterial new file mode 100644 index 0000000..e40833d Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/AssertionExample/Ball.physicMaterial differ diff --git a/Assets/UnityTestTools/TESTS/Examples/AssertionExample/Ball.physicMaterial.meta b/Assets/UnityTestTools/TESTS/Examples/AssertionExample/Ball.physicMaterial.meta new file mode 100644 index 0000000..d6bfd04 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/AssertionExample/Ball.physicMaterial.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: f9955b9bc48103645a71b05046ce13bc +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/AssertionExample/BouncingPlane.physicMaterial b/Assets/UnityTestTools/TESTS/Examples/AssertionExample/BouncingPlane.physicMaterial new file mode 100644 index 0000000..8d7d30d Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/AssertionExample/BouncingPlane.physicMaterial differ diff --git a/Assets/UnityTestTools/TESTS/Examples/AssertionExample/BouncingPlane.physicMaterial.meta b/Assets/UnityTestTools/TESTS/Examples/AssertionExample/BouncingPlane.physicMaterial.meta new file mode 100644 index 0000000..10dd191 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/AssertionExample/BouncingPlane.physicMaterial.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: c3a7173873a52c44cbed094e5e244493 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/AssertionExample/BouncingSphere.prefab b/Assets/UnityTestTools/TESTS/Examples/AssertionExample/BouncingSphere.prefab new file mode 100644 index 0000000..a0bf936 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/AssertionExample/BouncingSphere.prefab differ diff --git a/Assets/UnityTestTools/TESTS/Examples/AssertionExample/BouncingSphere.prefab.meta b/Assets/UnityTestTools/TESTS/Examples/AssertionExample/BouncingSphere.prefab.meta new file mode 100644 index 0000000..55210ae --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/AssertionExample/BouncingSphere.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: ea57e39611d17f148a04d1a1c84393d4 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/AssertionExample/Materials.meta b/Assets/UnityTestTools/TESTS/Examples/AssertionExample/Materials.meta new file mode 100644 index 0000000..0ca6622 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/AssertionExample/Materials.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: f6bd965477d21b64aad9f2d122a2496e +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/AssertionExample/Materials/checkerTexture.mat b/Assets/UnityTestTools/TESTS/Examples/AssertionExample/Materials/checkerTexture.mat new file mode 100644 index 0000000..3279d91 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/AssertionExample/Materials/checkerTexture.mat differ diff --git a/Assets/UnityTestTools/TESTS/Examples/AssertionExample/Materials/checkerTexture.mat.meta b/Assets/UnityTestTools/TESTS/Examples/AssertionExample/Materials/checkerTexture.mat.meta new file mode 100644 index 0000000..57dcfb2 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/AssertionExample/Materials/checkerTexture.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: d734a9661c1c7a94c94b027d59504baf +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/AssertionExample/NotBouncingPlane.physicMaterial b/Assets/UnityTestTools/TESTS/Examples/AssertionExample/NotBouncingPlane.physicMaterial new file mode 100644 index 0000000..e043ab1 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/AssertionExample/NotBouncingPlane.physicMaterial differ diff --git a/Assets/UnityTestTools/TESTS/Examples/AssertionExample/NotBouncingPlane.physicMaterial.meta b/Assets/UnityTestTools/TESTS/Examples/AssertionExample/NotBouncingPlane.physicMaterial.meta new file mode 100644 index 0000000..0b8474c --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/AssertionExample/NotBouncingPlane.physicMaterial.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 79b6f9d3d49d1a2469d2d9402570c834 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/AssertionExample/checkerTexture.png b/Assets/UnityTestTools/TESTS/Examples/AssertionExample/checkerTexture.png new file mode 100644 index 0000000..bc0b8fb Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/AssertionExample/checkerTexture.png differ diff --git a/Assets/UnityTestTools/TESTS/Examples/AssertionExample/checkerTexture.png.meta b/Assets/UnityTestTools/TESTS/Examples/AssertionExample/checkerTexture.png.meta new file mode 100644 index 0000000..098ab3e --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/AssertionExample/checkerTexture.png.meta @@ -0,0 +1,35 @@ +fileFormatVersion: 2 +guid: 080591fda7eb7d24cbe458aafca0b041 +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + textureType: 0 + buildTargetSettings: [] + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples.meta new file mode 100644 index 0000000..4e90a5c --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 6580c9b1070dd524c940a0c402d8b153 +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests.meta new file mode 100644 index 0000000..37cdd11 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 68d993feda7ffe748acaea2f44dbff18 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Animations.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Animations.meta new file mode 100644 index 0000000..912b994 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Animations.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: b83200d7123c88b4d9c24f4c88f7e694 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Animations/ShootAdditive.anim b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Animations/ShootAdditive.anim new file mode 100644 index 0000000..645640e Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Animations/ShootAdditive.anim differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Animations/ShootAdditive.anim.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Animations/ShootAdditive.anim.meta new file mode 100644 index 0000000..9814949 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Animations/ShootAdditive.anim.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 00a2c2298d1f54f909674141edb1041b +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/ExampleABTests.unity b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/ExampleABTests.unity new file mode 100644 index 0000000..c0c08ac Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/ExampleABTests.unity differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/ExampleABTests.unity.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/ExampleABTests.unity.meta new file mode 100644 index 0000000..fd45dfa --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/ExampleABTests.unity.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: a32fe04ca3b9bc64aa8f0db9aaa268f6 +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions.meta new file mode 100644 index 0000000..a6e7313 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: b41e893ab4c200143aa1ec8fd530617b +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials.meta new file mode 100644 index 0000000..515d5ad --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 339fa1d8314854a40b8d0a9c9726a6d5 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/Blob_Storm.mat b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/Blob_Storm.mat new file mode 100644 index 0000000..28406b0 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/Blob_Storm.mat differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/Blob_Storm.mat.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/Blob_Storm.mat.meta new file mode 100644 index 0000000..94fb8d9 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/Blob_Storm.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 43c3af1d49001417996af5e8a36cd699 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/BloodA.mat b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/BloodA.mat new file mode 100644 index 0000000..e6cc25d Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/BloodA.mat differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/BloodA.mat.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/BloodA.mat.meta new file mode 100644 index 0000000..f96f350 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/BloodA.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: cfccaa378af3f472ca3adcc8f939d397 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/ElectricShockwave.mat b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/ElectricShockwave.mat new file mode 100644 index 0000000..bf8933a Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/ElectricShockwave.mat differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/ElectricShockwave.mat.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/ElectricShockwave.mat.meta new file mode 100644 index 0000000..46646b5 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/ElectricShockwave.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 9d32c2efdb8794de3b449ab1bbc6459b +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/EleeectricSparksHitA.mat b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/EleeectricSparksHitA.mat new file mode 100644 index 0000000..c2e3c74 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/EleeectricSparksHitA.mat differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/EleeectricSparksHitA.mat.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/EleeectricSparksHitA.mat.meta new file mode 100644 index 0000000..eab98b8 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/EleeectricSparksHitA.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 9be28344ea0b64065bf04ab3d63a8de0 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/FireBall_Blue.mat b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/FireBall_Blue.mat new file mode 100644 index 0000000..df24284 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/FireBall_Blue.mat differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/FireBall_Blue.mat.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/FireBall_Blue.mat.meta new file mode 100644 index 0000000..e2d6660 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/FireBall_Blue.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 026976e57ed244642aa5de4510239bea +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/FireballA.mat b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/FireballA.mat new file mode 100644 index 0000000..e8c87d4 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/FireballA.mat differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/FireballA.mat.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/FireballA.mat.meta new file mode 100644 index 0000000..6bc3628 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/FireballA.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 3049dffabc5225d40b27675901977fdd +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/ShockWave_Simple.mat b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/ShockWave_Simple.mat new file mode 100644 index 0000000..b2450bd Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/ShockWave_Simple.mat differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/ShockWave_Simple.mat.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/ShockWave_Simple.mat.meta new file mode 100644 index 0000000..cb83a9c --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/ShockWave_Simple.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 0d3e3e18fa5d7451c8af78156975a0c0 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/SmokeA.mat b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/SmokeA.mat new file mode 100644 index 0000000..1ef8e7d Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/SmokeA.mat differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/SmokeA.mat.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/SmokeA.mat.meta new file mode 100644 index 0000000..53320ca --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/SmokeA.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 2d7e594d401a7524e82695dcd66c2bc0 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/scorchMarkSpider.mat b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/scorchMarkSpider.mat new file mode 100644 index 0000000..cb47aec Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/scorchMarkSpider.mat differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/scorchMarkSpider.mat.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/scorchMarkSpider.mat.meta new file mode 100644 index 0000000..5516477 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/scorchMarkSpider.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 5d07628057bf34bc4aa7e37d04672b29 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Scripts.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Scripts.meta new file mode 100644 index 0000000..148eff5 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Scripts.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 0314e59f90ffc854ca090496bd5cbce0 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Scripts/EffectSequencer.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Scripts/EffectSequencer.js new file mode 100644 index 0000000..83b0542 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Scripts/EffectSequencer.js @@ -0,0 +1,56 @@ +#pragma strict + +class ExplosionPart { + var gameObject : GameObject = null; + var delay : float = 0.0; + var hqOnly : boolean = false; + var yOffset : float = 0.0; +} + +public var ambientEmitters : ExplosionPart[]; +public var explosionEmitters : ExplosionPart[]; +public var smokeEmitters : ExplosionPart[]; + +public var miscSpecialEffects : ExplosionPart[]; + +function Start () { + var go : ExplosionPart; + var maxTime : float = 0; + + for (go in ambientEmitters) { + InstantiateDelayed(go); + if (go.gameObject.GetComponent.()) + maxTime = Mathf.Max (maxTime, go.delay + go.gameObject.GetComponent.().maxEnergy); + } + for (go in explosionEmitters) { + InstantiateDelayed(go); + if (go.gameObject.GetComponent.()) + maxTime = Mathf.Max (maxTime, go.delay + go.gameObject.GetComponent.().maxEnergy); + } + for (go in smokeEmitters) { + InstantiateDelayed(go); + if (go.gameObject.GetComponent.()) + maxTime = Mathf.Max (maxTime, go.delay + go.gameObject.GetComponent.().maxEnergy); + } + + if (GetComponent.() && GetComponent.().clip) + maxTime = Mathf.Max (maxTime, GetComponent.().clip.length); + + yield; + + for (go in miscSpecialEffects) { + InstantiateDelayed(go); + if (go.gameObject.GetComponent.()) + maxTime = Mathf.Max (maxTime, go.delay + go.gameObject.GetComponent.().maxEnergy); + } + + Destroy (gameObject, maxTime + 0.5); +} + +function InstantiateDelayed (go : ExplosionPart) { + //if (go.hqOnly && QualityManager.quality < Quality.High) + // return; + + yield WaitForSeconds (go.delay); + Instantiate (go.gameObject, transform.position + Vector3.up * go.yOffset, transform.rotation); +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Scripts/EffectSequencer.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Scripts/EffectSequencer.js.meta new file mode 100644 index 0000000..928965b --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Scripts/EffectSequencer.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 520a2b60096ec40d38a3dfa179f784a8 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Scripts/MuzzleFlashAnimate.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Scripts/MuzzleFlashAnimate.js new file mode 100644 index 0000000..38d12f4 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Scripts/MuzzleFlashAnimate.js @@ -0,0 +1,7 @@ + +#pragma strict + +function Update () { + transform.localScale = Vector3.one * Random.Range(0.5,1.5); + transform.localEulerAngles.z = Random.Range(0,90.0); +} \ No newline at end of file diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Scripts/MuzzleFlashAnimate.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Scripts/MuzzleFlashAnimate.js.meta new file mode 100644 index 0000000..ddda97f --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Scripts/MuzzleFlashAnimate.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0cdf562647f9346c492d3a7329db1756 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts.meta new file mode 100644 index 0000000..ae2adc4 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: f939067cafb958f4099528f2a88cfaa8 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/ElectricSparksA.prefab b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/ElectricSparksA.prefab new file mode 100644 index 0000000..522a62c Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/ElectricSparksA.prefab differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/ElectricSparksA.prefab.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/ElectricSparksA.prefab.meta new file mode 100644 index 0000000..02fbfd8 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/ElectricSparksA.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: e43bacea4bcd4475581f17fa064b08e5 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/ElectricSparksC.prefab b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/ElectricSparksC.prefab new file mode 100644 index 0000000..4494ca8 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/ElectricSparksC.prefab differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/ElectricSparksC.prefab.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/ElectricSparksC.prefab.meta new file mode 100644 index 0000000..7b5ba6e --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/ElectricSparksC.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 1b1bf49e3d3e34f32aeae829cbd4be43 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/ElectricSparksHitA.prefab b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/ElectricSparksHitA.prefab new file mode 100644 index 0000000..8befb27 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/ElectricSparksHitA.prefab differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/ElectricSparksHitA.prefab.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/ElectricSparksHitA.prefab.meta new file mode 100644 index 0000000..348111d --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/ElectricSparksHitA.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 0f5671d6ceae3417cba7097cfa4aa290 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/Fire_Spider.prefab b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/Fire_Spider.prefab new file mode 100644 index 0000000..5027649 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/Fire_Spider.prefab differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/Fire_Spider.prefab.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/Fire_Spider.prefab.meta new file mode 100644 index 0000000..cd299c8 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/Fire_Spider.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 97767d7c7ee0541cf8c1898412d39287 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/Fire_Spider_Detonate.prefab b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/Fire_Spider_Detonate.prefab new file mode 100644 index 0000000..99008ff Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/Fire_Spider_Detonate.prefab differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/Fire_Spider_Detonate.prefab.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/Fire_Spider_Detonate.prefab.meta new file mode 100644 index 0000000..891016b --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/Fire_Spider_Detonate.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 91c2f880b84384cb8981d186308bc257 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/ShockwaveA.prefab b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/ShockwaveA.prefab new file mode 100644 index 0000000..2a0b491 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/ShockwaveA.prefab differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/ShockwaveA.prefab.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/ShockwaveA.prefab.meta new file mode 100644 index 0000000..eb30082 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/ShockwaveA.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 24b406bea89b34ec582aae7babb277ba +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/Smoke_Spider_Missile.prefab b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/Smoke_Spider_Missile.prefab new file mode 100644 index 0000000..431a4d1 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/Smoke_Spider_Missile.prefab differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/Smoke_Spider_Missile.prefab.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/Smoke_Spider_Missile.prefab.meta new file mode 100644 index 0000000..e26c4e4 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/SequenceParts/Smoke_Spider_Missile.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 1b6efec96f2de41a9b93752f8e4dfa6f +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Sequences.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Sequences.meta new file mode 100644 index 0000000..3f0fca8 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Sequences.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: edcbdd6eb6d834846ab0bebb5387cd9b +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Sequences/ExplosionSequenceSpider.prefab b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Sequences/ExplosionSequenceSpider.prefab new file mode 100644 index 0000000..8ea37f0 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Sequences/ExplosionSequenceSpider.prefab differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Sequences/ExplosionSequenceSpider.prefab.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Sequences/ExplosionSequenceSpider.prefab.meta new file mode 100644 index 0000000..33af57a --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Sequences/ExplosionSequenceSpider.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 373c2c2682efb424e9c667738eaee503 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Sequences/ExplosionSequenceSpiderDetonate.prefab b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Sequences/ExplosionSequenceSpiderDetonate.prefab new file mode 100644 index 0000000..54319df Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Sequences/ExplosionSequenceSpiderDetonate.prefab differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Sequences/ExplosionSequenceSpiderDetonate.prefab.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Sequences/ExplosionSequenceSpiderDetonate.prefab.meta new file mode 100644 index 0000000..e3e2a41 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Sequences/ExplosionSequenceSpiderDetonate.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 176cb82da2d4b47209bf74dccc47f86c +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Standalone.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Standalone.meta new file mode 100644 index 0000000..6252adc --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Standalone.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 4d2f99df718ae9943b7a0f320c60e431 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Standalone/Blood_Splatter.prefab b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Standalone/Blood_Splatter.prefab new file mode 100644 index 0000000..f1160a0 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Standalone/Blood_Splatter.prefab differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Standalone/Blood_Splatter.prefab.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Standalone/Blood_Splatter.prefab.meta new file mode 100644 index 0000000..5d4fde8 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Standalone/Blood_Splatter.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 22221d1942e66451b8d06811bff21613 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures.meta new file mode 100644 index 0000000..388f0ef --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: b9f11db82afab6d4a920497d422037a0 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/AfterExplosion_B.psd b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/AfterExplosion_B.psd new file mode 100644 index 0000000..c6ed407 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/AfterExplosion_B.psd differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/AfterExplosion_B.psd.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/AfterExplosion_B.psd.meta new file mode 100644 index 0000000..859c70f --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/AfterExplosion_B.psd.meta @@ -0,0 +1,64 @@ +fileFormatVersion: 2 +guid: 1d89c00039fa543dcb9ccc5deb4aaf03 +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 256 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: 0 + buildTargetSettings: + - buildTarget: Web + maxTextureSize: 256 + textureFormat: -1 + compressionQuality: -1 + - buildTarget: Standalone + maxTextureSize: 256 + textureFormat: -1 + compressionQuality: -1 + - buildTarget: iPhone + maxTextureSize: 128 + textureFormat: -1 + compressionQuality: -1 + - buildTarget: Android + maxTextureSize: 128 + textureFormat: -1 + compressionQuality: -1 + - buildTarget: FlashPlayer + maxTextureSize: 256 + textureFormat: -1 + compressionQuality: 20 + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/BloodA_test.psd b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/BloodA_test.psd new file mode 100644 index 0000000..7dbe42a Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/BloodA_test.psd differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/BloodA_test.psd.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/BloodA_test.psd.meta new file mode 100644 index 0000000..a4ee753 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/BloodA_test.psd.meta @@ -0,0 +1,64 @@ +fileFormatVersion: 2 +guid: 38a148d20bb184d4797f99fa972a6d97 +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 128 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: 0 + buildTargetSettings: + - buildTarget: Web + maxTextureSize: 64 + textureFormat: -1 + compressionQuality: -1 + - buildTarget: Standalone + maxTextureSize: 64 + textureFormat: -1 + compressionQuality: -1 + - buildTarget: iPhone + maxTextureSize: 64 + textureFormat: -1 + compressionQuality: -1 + - buildTarget: Android + maxTextureSize: 64 + textureFormat: -1 + compressionQuality: -1 + - buildTarget: FlashPlayer + maxTextureSize: 128 + textureFormat: -1 + compressionQuality: 0 + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/ElectricShockwave1.psd b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/ElectricShockwave1.psd new file mode 100644 index 0000000..a26f41b Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/ElectricShockwave1.psd differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/ElectricShockwave1.psd.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/ElectricShockwave1.psd.meta new file mode 100644 index 0000000..1d6c779 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/ElectricShockwave1.psd.meta @@ -0,0 +1,60 @@ +fileFormatVersion: 2 +guid: f10f8a975ed7146b8a566c2f787343a5 +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 2 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 128 + textureSettings: + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapMode: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: 0 + buildTargetSettings: + - buildTarget: Web + maxTextureSize: 128 + textureFormat: -1 + compressionQuality: 50 + - buildTarget: Standalone + maxTextureSize: 128 + textureFormat: -1 + compressionQuality: 50 + - buildTarget: iPhone + maxTextureSize: 128 + textureFormat: -1 + compressionQuality: 50 + - buildTarget: Android + maxTextureSize: 128 + textureFormat: -1 + compressionQuality: 50 + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Fireball_Blue_UVA.psd b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Fireball_Blue_UVA.psd new file mode 100644 index 0000000..5b634df Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Fireball_Blue_UVA.psd differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Fireball_Blue_UVA.psd.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Fireball_Blue_UVA.psd.meta new file mode 100644 index 0000000..b7b7a8d --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Fireball_Blue_UVA.psd.meta @@ -0,0 +1,64 @@ +fileFormatVersion: 2 +guid: 596d02b7e6a264b4f85b42fe791580c2 +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 512 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: 0 + buildTargetSettings: + - buildTarget: Web + maxTextureSize: 512 + textureFormat: -1 + compressionQuality: -1 + - buildTarget: Standalone + maxTextureSize: 512 + textureFormat: -1 + compressionQuality: -1 + - buildTarget: iPhone + maxTextureSize: 128 + textureFormat: -1 + compressionQuality: -1 + - buildTarget: Android + maxTextureSize: 128 + textureFormat: -1 + compressionQuality: -1 + - buildTarget: FlashPlayer + maxTextureSize: 512 + textureFormat: -1 + compressionQuality: 10 + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Fireball_Storm_UVA_01_test.psd b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Fireball_Storm_UVA_01_test.psd new file mode 100644 index 0000000..23e33ea Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Fireball_Storm_UVA_01_test.psd differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Fireball_Storm_UVA_01_test.psd.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Fireball_Storm_UVA_01_test.psd.meta new file mode 100644 index 0000000..8dc9b7f --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Fireball_Storm_UVA_01_test.psd.meta @@ -0,0 +1,64 @@ +fileFormatVersion: 2 +guid: fcc6c17b515a14312ac72839d1212b0a +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 512 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: 0 + buildTargetSettings: + - buildTarget: Web + maxTextureSize: 512 + textureFormat: -1 + compressionQuality: -1 + - buildTarget: Standalone + maxTextureSize: 512 + textureFormat: -1 + compressionQuality: -1 + - buildTarget: iPhone + maxTextureSize: 128 + textureFormat: -1 + compressionQuality: -1 + - buildTarget: Android + maxTextureSize: 128 + textureFormat: -1 + compressionQuality: -1 + - buildTarget: FlashPlayer + maxTextureSize: 512 + textureFormat: -1 + compressionQuality: 10 + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Muzzle_Flash_Front_A.psd b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Muzzle_Flash_Front_A.psd new file mode 100644 index 0000000..bc6227a Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Muzzle_Flash_Front_A.psd differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Muzzle_Flash_Front_A.psd.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Muzzle_Flash_Front_A.psd.meta new file mode 100644 index 0000000..c48f86e --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Muzzle_Flash_Front_A.psd.meta @@ -0,0 +1,64 @@ +fileFormatVersion: 2 +guid: e0a74726c7d9b4ee09334ab50155ea80 +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 128 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: 0 + buildTargetSettings: + - buildTarget: Web + maxTextureSize: 128 + textureFormat: -1 + compressionQuality: -1 + - buildTarget: Standalone + maxTextureSize: 128 + textureFormat: -1 + compressionQuality: -1 + - buildTarget: iPhone + maxTextureSize: 64 + textureFormat: -1 + compressionQuality: -1 + - buildTarget: Android + maxTextureSize: 64 + textureFormat: -1 + compressionQuality: -1 + - buildTarget: FlashPlayer + maxTextureSize: 128 + textureFormat: -1 + compressionQuality: 0 + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Shockwave.psd b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Shockwave.psd new file mode 100644 index 0000000..5d076be Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Shockwave.psd differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Shockwave.psd.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Shockwave.psd.meta new file mode 100644 index 0000000..3517352 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Shockwave.psd.meta @@ -0,0 +1,60 @@ +fileFormatVersion: 2 +guid: b7460a00d2f78cc48a5f7acbafe163e8 +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 2 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapMode: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: 0 + buildTargetSettings: + - buildTarget: Web + maxTextureSize: 128 + textureFormat: -1 + compressionQuality: 50 + - buildTarget: Standalone + maxTextureSize: 128 + textureFormat: -1 + compressionQuality: 50 + - buildTarget: iPhone + maxTextureSize: 64 + textureFormat: -1 + compressionQuality: 50 + - buildTarget: Android + maxTextureSize: 64 + textureFormat: -1 + compressionQuality: 50 + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Smoke.psd b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Smoke.psd new file mode 100644 index 0000000..2da4422 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Smoke.psd differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Smoke.psd.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Smoke.psd.meta new file mode 100644 index 0000000..5a943dd --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Smoke.psd.meta @@ -0,0 +1,60 @@ +fileFormatVersion: 2 +guid: 2a6221eb1b1c50a4cb69a62e2f264e58 +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 2 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 1 + heightScale: .113163002 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 512 + textureSettings: + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapMode: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: 1 + buildTargetSettings: + - buildTarget: Web + maxTextureSize: 256 + textureFormat: -1 + compressionQuality: 50 + - buildTarget: Standalone + maxTextureSize: 256 + textureFormat: -1 + compressionQuality: 50 + - buildTarget: iPhone + maxTextureSize: 128 + textureFormat: -1 + compressionQuality: 50 + - buildTarget: Android + maxTextureSize: 128 + textureFormat: -1 + compressionQuality: 50 + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Smoke_Storm_UVA_02_test.psd b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Smoke_Storm_UVA_02_test.psd new file mode 100644 index 0000000..4ff0dd3 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Smoke_Storm_UVA_02_test.psd differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Smoke_Storm_UVA_02_test.psd.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Smoke_Storm_UVA_02_test.psd.meta new file mode 100644 index 0000000..0d2bdad --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/Smoke_Storm_UVA_02_test.psd.meta @@ -0,0 +1,60 @@ +fileFormatVersion: 2 +guid: 49d183629522f456981418447438c869 +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: 0 + buildTargetSettings: + - buildTarget: Web + maxTextureSize: 256 + textureFormat: -1 + compressionQuality: 50 + - buildTarget: Standalone + maxTextureSize: 256 + textureFormat: -1 + compressionQuality: 50 + - buildTarget: iPhone + maxTextureSize: 128 + textureFormat: -1 + compressionQuality: 50 + - buildTarget: Android + maxTextureSize: 128 + textureFormat: -1 + compressionQuality: 50 + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/blob.psd b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/blob.psd new file mode 100644 index 0000000..5f0787b Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/blob.psd differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/blob.psd.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/blob.psd.meta new file mode 100644 index 0000000..c3e115b --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/blob.psd.meta @@ -0,0 +1,60 @@ +fileFormatVersion: 2 +guid: fb5d3487c412c4fa9ad41827a46623bb +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 256 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: 0 + buildTargetSettings: + - buildTarget: iPhone + maxTextureSize: 64 + textureFormat: -3 + compressionQuality: 50 + - buildTarget: Web + maxTextureSize: 64 + textureFormat: -3 + compressionQuality: 50 + - buildTarget: Standalone + maxTextureSize: 64 + textureFormat: -3 + compressionQuality: 50 + - buildTarget: Android + maxTextureSize: 64 + textureFormat: -3 + compressionQuality: 50 + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/whiteBlob.psd b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/whiteBlob.psd new file mode 100644 index 0000000..debefd7 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/whiteBlob.psd differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/whiteBlob.psd.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/whiteBlob.psd.meta new file mode 100644 index 0000000..18b2ad7 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Textures/whiteBlob.psd.meta @@ -0,0 +1,44 @@ +fileFormatVersion: 2 +guid: 9d05c439cf1b74b0090725b5852c56cb +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 2 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 1 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: 5 + maxTextureSize: 64 + textureSettings: + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapMode: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials.meta new file mode 100644 index 0000000..8fb0b25 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 463d57bb50a73f44ea5a92f4b07ec3ff +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/Cursor.mat b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/Cursor.mat new file mode 100644 index 0000000..e7df346 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/Cursor.mat differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/Cursor.mat.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/Cursor.mat.meta new file mode 100644 index 0000000..bf872e1 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/Cursor.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 6e42c90cd211e40278389f82657608d2 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/Decal.mat b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/Decal.mat new file mode 100644 index 0000000..f06da80 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/Decal.mat differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/Decal.mat.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/Decal.mat.meta new file mode 100644 index 0000000..398f584 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/Decal.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 5231caf19bce04df29d48d73a92356f2 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/GlowPlane.mat b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/GlowPlane.mat new file mode 100644 index 0000000..a241308 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/GlowPlane.mat differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/GlowPlane.mat.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/GlowPlane.mat.meta new file mode 100644 index 0000000..a3ed01f --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/GlowPlane.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 8f72bd63908224f2bb00f3844f7d1018 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/LaserDot.mat b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/LaserDot.mat new file mode 100644 index 0000000..15c16f5 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/LaserDot.mat differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/LaserDot.mat.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/LaserDot.mat.meta new file mode 100644 index 0000000..ce5da54 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/LaserDot.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 40ddda021ce77480d8a47a41b57bbb6a +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/LaserMaterial.mat b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/LaserMaterial.mat new file mode 100644 index 0000000..dad1cda Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/LaserMaterial.mat differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/LaserMaterial.mat.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/LaserMaterial.mat.meta new file mode 100644 index 0000000..4110986 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/LaserMaterial.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: ebf996884992847a8bf2f4f12b04677c +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/Reflection.mat b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/Reflection.mat new file mode 100644 index 0000000..5fadf7b Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/Reflection.mat differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/Reflection.mat.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/Reflection.mat.meta new file mode 100644 index 0000000..eb4c106 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/Reflection.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 22b43c3aa0097483d92b4cca9adbb7f3 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/Trail.mat b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/Trail.mat new file mode 100644 index 0000000..a7d71c2 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/Trail.mat differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/Trail.mat.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/Trail.mat.meta new file mode 100644 index 0000000..979737d --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/Trail.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 436a8033c36e41c47a6e2a1cfd0dcb04 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/healthbar_player.mat b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/healthbar_player.mat new file mode 100644 index 0000000..811ee01 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/healthbar_player.mat differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/healthbar_player.mat.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/healthbar_player.mat.meta new file mode 100644 index 0000000..a8c32f1 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/healthbar_player.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: ccc8b5039e68def429242f31cb9ff971 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/minebot_diffuse.mat b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/minebot_diffuse.mat new file mode 100644 index 0000000..f142dc0 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/minebot_diffuse.mat differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/minebot_diffuse.mat.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/minebot_diffuse.mat.meta new file mode 100644 index 0000000..f37dff6 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/minebot_diffuse.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: ca159162814614f2e96f37b3192a5868 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/weapon.mat b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/weapon.mat new file mode 100644 index 0000000..ee6c054 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/weapon.mat differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/weapon.mat.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/weapon.mat.meta new file mode 100644 index 0000000..7afaa5c --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Materials/weapon.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 0723fdd1d7ab0e447bf8a9f28e4a19a1 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects.meta new file mode 100644 index 0000000..7c3df65 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: d16e4419eeb3b894290e3f152e0210f2 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies.meta new file mode 100644 index 0000000..94d21d3 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: f2fb0a761a130da4aaa15801b5687b61 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot.FBX b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot.FBX new file mode 100644 index 0000000..6c1483c Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot.FBX differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot.FBX.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot.FBX.meta new file mode 100644 index 0000000..2b7de40 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot.FBX.meta @@ -0,0 +1,112 @@ +fileFormatVersion: 2 +guid: caeffedc34d9f4161b7694ad0d84bbd3 +ModelImporter: + serializedVersion: 15 + fileIDToRecycleName: + 100000: minebot_front_upperleg 1 + 100002: minebot_left_lowerleg + 100004: minebot_left_upperleg + 100006: minebot_back_lowerleg + 100008: minebot_front_upperleg + 100010: minebot_right_lowerleg + 100012: minebot_right_upperleg + 100014: //RootNode + 100016: minebot_main + 100018: minebot_head + 100020: minebot_front_lowerleg + 400000: minebot_front_upperleg 1 + 400002: minebot_left_lowerleg + 400004: minebot_left_upperleg + 400006: minebot_back_lowerleg + 400008: minebot_front_upperleg + 400010: minebot_right_lowerleg + 400012: minebot_right_upperleg + 400014: //RootNode + 400016: minebot_main + 400018: minebot_head + 400020: minebot_front_lowerleg + 2300000: minebot_front_upperleg 1 + 2300002: minebot_left_lowerleg + 2300004: minebot_left_upperleg + 2300006: minebot_back_lowerleg + 2300008: minebot_front_upperleg + 2300010: minebot_right_lowerleg + 2300012: minebot_right_upperleg + 2300014: minebot_main + 2300016: minebot_head + 2300018: minebot_front_lowerleg + 3300000: minebot_front_upperleg 1 + 3300002: minebot_left_lowerleg + 3300004: minebot_left_upperleg + 3300006: minebot_back_lowerleg + 3300008: minebot_front_upperleg + 3300010: minebot_right_lowerleg + 3300012: minebot_right_upperleg + 3300014: minebot_main + 3300016: minebot_head + 3300018: minebot_front_lowerleg + 4300000: minebot_main + 4300002: minebot_right_upperleg + 4300004: minebot_right_lowerleg + 4300006: minebot_head + 4300008: minebot_front_upperleg + 4300010: minebot_back_lowerleg + 4300012: minebot_left_upperleg + 4300014: minebot_left_lowerleg + 4300016: minebot_front_upperleg + 4300018: minebot_front_lowerleg + 7400004: Take 001 + 7400006: __preview__Take 001 + 11100000: //RootNode + materials: + importMaterials: 1 + materialName: 3 + materialSearch: 1 + animations: + legacyGenerateAnimations: 3 + bakeSimulation: 0 + optimizeGameObjects: 0 + animationCompression: 1 + animationRotationError: .5 + animationPositionError: .5 + animationScaleError: .5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + clipAnimations: [] + isReadable: 1 + meshes: + lODScreenPercentages: [] + globalScale: .0130000003 + meshCompression: 0 + addColliders: 0 + importBlendShapes: 1 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + optimizeMeshForGPU: 1 + weldVertices: 1 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + tangentSpace: + normalSmoothAngle: 60 + splitTangentsAcrossUV: 1 + normalImportMode: 0 + tangentImportMode: 1 + importAnimation: 1 + copyAvatar: 0 + humanDescription: + human: [] + skeleton: [] + armTwist: .5 + foreArmTwist: .5 + upperLegTwist: .5 + legTwist: .5 + armStretch: .0500000007 + legStretch: .0500000007 + feetSpacing: 0 + rootMotionBoneName: + lastHumanDescriptionAvatarSource: {instanceID: 0} + animationType: 1 + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot@awake.FBX b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot@awake.FBX new file mode 100644 index 0000000..6c1483c Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot@awake.FBX differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot@awake.FBX.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot@awake.FBX.meta new file mode 100644 index 0000000..3a26b1e --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot@awake.FBX.meta @@ -0,0 +1,112 @@ +fileFormatVersion: 2 +guid: 7e212db0aa2c00b448aa511ece336f20 +ModelImporter: + serializedVersion: 15 + fileIDToRecycleName: + 100000: minebot_front_upperleg 1 + 100002: minebot_left_lowerleg + 100004: minebot_left_upperleg + 100006: minebot_back_lowerleg + 100008: minebot_front_upperleg + 100010: minebot_right_lowerleg + 100012: minebot_right_upperleg + 100014: //RootNode + 100016: minebot_main + 100018: minebot_head + 100020: minebot_front_lowerleg + 400000: minebot_front_upperleg 1 + 400002: minebot_left_lowerleg + 400004: minebot_left_upperleg + 400006: minebot_back_lowerleg + 400008: minebot_front_upperleg + 400010: minebot_right_lowerleg + 400012: minebot_right_upperleg + 400014: //RootNode + 400016: minebot_main + 400018: minebot_head + 400020: minebot_front_lowerleg + 2300000: minebot_front_upperleg 1 + 2300002: minebot_left_lowerleg + 2300004: minebot_left_upperleg + 2300006: minebot_back_lowerleg + 2300008: minebot_front_upperleg + 2300010: minebot_right_lowerleg + 2300012: minebot_right_upperleg + 2300014: minebot_main + 2300016: minebot_head + 2300018: minebot_front_lowerleg + 3300000: minebot_front_upperleg 1 + 3300002: minebot_left_lowerleg + 3300004: minebot_left_upperleg + 3300006: minebot_back_lowerleg + 3300008: minebot_front_upperleg + 3300010: minebot_right_lowerleg + 3300012: minebot_right_upperleg + 3300014: minebot_main + 3300016: minebot_head + 3300018: minebot_front_lowerleg + 4300000: minebot_main + 4300002: minebot_right_upperleg + 4300004: minebot_right_lowerleg + 4300006: minebot_head + 4300008: minebot_front_upperleg + 4300010: minebot_back_lowerleg + 4300012: minebot_left_upperleg + 4300014: minebot_left_lowerleg + 4300016: minebot_front_upperleg + 4300018: minebot_front_lowerleg + 7400002: Take 001 + 7400004: __preview__Take 001 + 11100000: //RootNode + materials: + importMaterials: 1 + materialName: 3 + materialSearch: 1 + animations: + legacyGenerateAnimations: 3 + bakeSimulation: 0 + optimizeGameObjects: 0 + animationCompression: 1 + animationRotationError: .5 + animationPositionError: .5 + animationScaleError: .5 + animationWrapMode: 8 + extraExposedTransformPaths: [] + clipAnimations: [] + isReadable: 1 + meshes: + lODScreenPercentages: [] + globalScale: .0130000003 + meshCompression: 0 + addColliders: 0 + importBlendShapes: 1 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + optimizeMeshForGPU: 1 + weldVertices: 1 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + tangentSpace: + normalSmoothAngle: 60 + splitTangentsAcrossUV: 1 + normalImportMode: 0 + tangentImportMode: 1 + importAnimation: 1 + copyAvatar: 0 + humanDescription: + human: [] + skeleton: [] + armTwist: .5 + foreArmTwist: .5 + upperLegTwist: .5 + legTwist: .5 + armStretch: .0500000007 + legStretch: .0500000007 + feetSpacing: 0 + rootMotionBoneName: + lastHumanDescriptionAvatarSource: {instanceID: 0} + animationType: 1 + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot@back.FBX b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot@back.FBX new file mode 100644 index 0000000..6c20f33 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot@back.FBX differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot@back.FBX.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot@back.FBX.meta new file mode 100644 index 0000000..0cd3354 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot@back.FBX.meta @@ -0,0 +1,112 @@ +fileFormatVersion: 2 +guid: a13fed205b1fa3942abfab7ba21463ec +ModelImporter: + serializedVersion: 15 + fileIDToRecycleName: + 100000: minebot_main + 100002: //RootNode + 100004: minebot_head + 100006: minebot_back_lowerleg + 100008: minebot_front_lowerleg + 100010: minebot_left_lowerleg + 100012: minebot_front_upperleg + 100014: minebot_front_upperleg 1 + 100016: minebot_right_lowerleg + 100018: minebot_right_upperleg + 100020: minebot_left_upperleg + 400000: minebot_main + 400002: //RootNode + 400004: minebot_head + 400006: minebot_back_lowerleg + 400008: minebot_front_lowerleg + 400010: minebot_left_lowerleg + 400012: minebot_front_upperleg + 400014: minebot_front_upperleg 1 + 400016: minebot_right_lowerleg + 400018: minebot_right_upperleg + 400020: minebot_left_upperleg + 2300000: minebot_main + 2300002: minebot_head + 2300004: minebot_back_lowerleg + 2300006: minebot_front_lowerleg + 2300008: minebot_left_lowerleg + 2300010: minebot_front_upperleg + 2300012: minebot_front_upperleg 1 + 2300014: minebot_right_lowerleg + 2300016: minebot_right_upperleg + 2300018: minebot_left_upperleg + 3300000: minebot_main + 3300002: minebot_head + 3300004: minebot_back_lowerleg + 3300006: minebot_front_lowerleg + 3300008: minebot_left_lowerleg + 3300010: minebot_front_upperleg + 3300012: minebot_front_upperleg 1 + 3300014: minebot_right_lowerleg + 3300016: minebot_right_upperleg + 3300018: minebot_left_upperleg + 4300000: minebot_main + 4300002: minebot_right_upperleg + 4300004: minebot_right_lowerleg + 4300006: minebot_head + 4300008: minebot_front_upperleg + 4300010: minebot_back_lowerleg + 4300012: minebot_left_upperleg + 4300014: minebot_left_lowerleg + 4300016: minebot_front_upperleg + 4300018: minebot_front_lowerleg + 7400002: Take 001 + 7400004: __preview__Take 001 + 11100000: //RootNode + materials: + importMaterials: 1 + materialName: 3 + materialSearch: 1 + animations: + legacyGenerateAnimations: 3 + bakeSimulation: 0 + optimizeGameObjects: 0 + animationCompression: 1 + animationRotationError: .5 + animationPositionError: .5 + animationScaleError: .5 + animationWrapMode: 2 + extraExposedTransformPaths: [] + clipAnimations: [] + isReadable: 1 + meshes: + lODScreenPercentages: [] + globalScale: .0130000003 + meshCompression: 0 + addColliders: 0 + importBlendShapes: 1 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + optimizeMeshForGPU: 1 + weldVertices: 1 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + tangentSpace: + normalSmoothAngle: 60 + splitTangentsAcrossUV: 1 + normalImportMode: 0 + tangentImportMode: 1 + importAnimation: 1 + copyAvatar: 0 + humanDescription: + human: [] + skeleton: [] + armTwist: .5 + foreArmTwist: .5 + upperLegTwist: .5 + legTwist: .5 + armStretch: .0500000007 + legStretch: .0500000007 + feetSpacing: 0 + rootMotionBoneName: + lastHumanDescriptionAvatarSource: {instanceID: 0} + animationType: 1 + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot@forward.FBX b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot@forward.FBX new file mode 100644 index 0000000..534e64a Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot@forward.FBX differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot@forward.FBX.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot@forward.FBX.meta new file mode 100644 index 0000000..d1dcf65 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot@forward.FBX.meta @@ -0,0 +1,112 @@ +fileFormatVersion: 2 +guid: 1da85f72a7a82bc4eabdbd8f0683bde2 +ModelImporter: + serializedVersion: 15 + fileIDToRecycleName: + 100000: //RootNode + 100002: minebot_main + 100004: minebot_head + 100006: minebot_back_lowerleg + 100008: minebot_front_upperleg 1 + 100010: minebot_left_lowerleg + 100012: minebot_front_upperleg + 100014: minebot_right_lowerleg + 100016: minebot_front_lowerleg + 100018: minebot_right_upperleg + 100020: minebot_left_upperleg + 400000: //RootNode + 400002: minebot_main + 400004: minebot_head + 400006: minebot_back_lowerleg + 400008: minebot_front_upperleg 1 + 400010: minebot_left_lowerleg + 400012: minebot_front_upperleg + 400014: minebot_right_lowerleg + 400016: minebot_front_lowerleg + 400018: minebot_right_upperleg + 400020: minebot_left_upperleg + 2300000: minebot_main + 2300002: minebot_head + 2300004: minebot_back_lowerleg + 2300006: minebot_front_upperleg 1 + 2300008: minebot_left_lowerleg + 2300010: minebot_front_upperleg + 2300012: minebot_right_lowerleg + 2300014: minebot_front_lowerleg + 2300016: minebot_right_upperleg + 2300018: minebot_left_upperleg + 3300000: minebot_main + 3300002: minebot_head + 3300004: minebot_back_lowerleg + 3300006: minebot_front_upperleg 1 + 3300008: minebot_left_lowerleg + 3300010: minebot_front_upperleg + 3300012: minebot_right_lowerleg + 3300014: minebot_front_lowerleg + 3300016: minebot_right_upperleg + 3300018: minebot_left_upperleg + 4300000: minebot_main + 4300002: minebot_right_upperleg + 4300004: minebot_right_lowerleg + 4300006: minebot_head + 4300008: minebot_front_upperleg + 4300010: minebot_back_lowerleg + 4300012: minebot_left_upperleg + 4300014: minebot_left_lowerleg + 4300016: minebot_front_upperleg + 4300018: minebot_front_lowerleg + 7400002: Take 001 + 7400004: __preview__Take 001 + 11100000: //RootNode + materials: + importMaterials: 1 + materialName: 3 + materialSearch: 1 + animations: + legacyGenerateAnimations: 3 + bakeSimulation: 0 + optimizeGameObjects: 0 + animationCompression: 1 + animationRotationError: .5 + animationPositionError: .5 + animationScaleError: .5 + animationWrapMode: 2 + extraExposedTransformPaths: [] + clipAnimations: [] + isReadable: 1 + meshes: + lODScreenPercentages: [] + globalScale: .0130000003 + meshCompression: 0 + addColliders: 0 + importBlendShapes: 1 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + optimizeMeshForGPU: 1 + weldVertices: 1 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + tangentSpace: + normalSmoothAngle: 60 + splitTangentsAcrossUV: 1 + normalImportMode: 0 + tangentImportMode: 1 + importAnimation: 1 + copyAvatar: 0 + humanDescription: + human: [] + skeleton: [] + armTwist: .5 + foreArmTwist: .5 + upperLegTwist: .5 + legTwist: .5 + armStretch: .0500000007 + legStretch: .0500000007 + feetSpacing: 0 + rootMotionBoneName: + lastHumanDescriptionAvatarSource: {instanceID: 0} + animationType: 1 + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot@left.FBX b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot@left.FBX new file mode 100644 index 0000000..8fed363 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot@left.FBX differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot@left.FBX.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot@left.FBX.meta new file mode 100644 index 0000000..365018a --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot@left.FBX.meta @@ -0,0 +1,112 @@ +fileFormatVersion: 2 +guid: b667956babf1f0446a76fa8b99404ab8 +ModelImporter: + serializedVersion: 15 + fileIDToRecycleName: + 100000: minebot_head + 100002: //RootNode + 100004: minebot_main + 100006: minebot_back_lowerleg + 100008: minebot_front_lowerleg + 100010: minebot_front_upperleg 1 + 100012: minebot_right_upperleg + 100014: minebot_left_lowerleg + 100016: minebot_left_upperleg + 100018: minebot_right_lowerleg + 100020: minebot_front_upperleg + 400000: minebot_head + 400002: //RootNode + 400004: minebot_main + 400006: minebot_back_lowerleg + 400008: minebot_front_lowerleg + 400010: minebot_front_upperleg 1 + 400012: minebot_right_upperleg + 400014: minebot_left_lowerleg + 400016: minebot_left_upperleg + 400018: minebot_right_lowerleg + 400020: minebot_front_upperleg + 2300000: minebot_head + 2300002: minebot_main + 2300004: minebot_back_lowerleg + 2300006: minebot_front_lowerleg + 2300008: minebot_front_upperleg 1 + 2300010: minebot_right_upperleg + 2300012: minebot_left_lowerleg + 2300014: minebot_left_upperleg + 2300016: minebot_right_lowerleg + 2300018: minebot_front_upperleg + 3300000: minebot_head + 3300002: minebot_main + 3300004: minebot_back_lowerleg + 3300006: minebot_front_lowerleg + 3300008: minebot_front_upperleg 1 + 3300010: minebot_right_upperleg + 3300012: minebot_left_lowerleg + 3300014: minebot_left_upperleg + 3300016: minebot_right_lowerleg + 3300018: minebot_front_upperleg + 4300000: minebot_main + 4300002: minebot_right_upperleg + 4300004: minebot_right_lowerleg + 4300006: minebot_head + 4300008: minebot_front_upperleg + 4300010: minebot_back_lowerleg + 4300012: minebot_left_upperleg + 4300014: minebot_left_lowerleg + 4300016: minebot_front_upperleg + 4300018: minebot_front_lowerleg + 7400002: Take 001 + 7400004: __preview__Take 001 + 11100000: //RootNode + materials: + importMaterials: 1 + materialName: 3 + materialSearch: 1 + animations: + legacyGenerateAnimations: 3 + bakeSimulation: 0 + optimizeGameObjects: 0 + animationCompression: 1 + animationRotationError: .5 + animationPositionError: .5 + animationScaleError: .5 + animationWrapMode: 2 + extraExposedTransformPaths: [] + clipAnimations: [] + isReadable: 1 + meshes: + lODScreenPercentages: [] + globalScale: .0130000003 + meshCompression: 0 + addColliders: 0 + importBlendShapes: 1 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + optimizeMeshForGPU: 1 + weldVertices: 1 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + tangentSpace: + normalSmoothAngle: 60 + splitTangentsAcrossUV: 1 + normalImportMode: 0 + tangentImportMode: 1 + importAnimation: 1 + copyAvatar: 0 + humanDescription: + human: [] + skeleton: [] + armTwist: .5 + foreArmTwist: .5 + upperLegTwist: .5 + legTwist: .5 + armStretch: .0500000007 + legStretch: .0500000007 + feetSpacing: 0 + rootMotionBoneName: + lastHumanDescriptionAvatarSource: {instanceID: 0} + animationType: 1 + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot@right.FBX b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot@right.FBX new file mode 100644 index 0000000..e9d23f8 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot@right.FBX differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot@right.FBX.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot@right.FBX.meta new file mode 100644 index 0000000..6ff0558 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Enemies/mine_bot@right.FBX.meta @@ -0,0 +1,112 @@ +fileFormatVersion: 2 +guid: f8136785e54fd1d459d2a3a0849fe770 +ModelImporter: + serializedVersion: 15 + fileIDToRecycleName: + 100000: minebot_head + 100002: minebot_main + 100004: //RootNode + 100006: minebot_front_lowerleg + 100008: minebot_back_lowerleg + 100010: minebot_front_upperleg + 100012: minebot_left_lowerleg + 100014: minebot_right_upperleg + 100016: minebot_front_upperleg 1 + 100018: minebot_left_upperleg + 100020: minebot_right_lowerleg + 400000: minebot_head + 400002: minebot_main + 400004: //RootNode + 400006: minebot_front_lowerleg + 400008: minebot_back_lowerleg + 400010: minebot_front_upperleg + 400012: minebot_left_lowerleg + 400014: minebot_right_upperleg + 400016: minebot_front_upperleg 1 + 400018: minebot_left_upperleg + 400020: minebot_right_lowerleg + 2300000: minebot_head + 2300002: minebot_main + 2300004: minebot_front_lowerleg + 2300006: minebot_back_lowerleg + 2300008: minebot_front_upperleg + 2300010: minebot_left_lowerleg + 2300012: minebot_right_upperleg + 2300014: minebot_front_upperleg 1 + 2300016: minebot_left_upperleg + 2300018: minebot_right_lowerleg + 3300000: minebot_head + 3300002: minebot_main + 3300004: minebot_front_lowerleg + 3300006: minebot_back_lowerleg + 3300008: minebot_front_upperleg + 3300010: minebot_left_lowerleg + 3300012: minebot_right_upperleg + 3300014: minebot_front_upperleg 1 + 3300016: minebot_left_upperleg + 3300018: minebot_right_lowerleg + 4300000: minebot_main + 4300002: minebot_right_upperleg + 4300004: minebot_right_lowerleg + 4300006: minebot_head + 4300008: minebot_front_upperleg + 4300010: minebot_back_lowerleg + 4300012: minebot_left_upperleg + 4300014: minebot_left_lowerleg + 4300016: minebot_front_upperleg + 4300018: minebot_front_lowerleg + 7400002: Take 001 + 7400004: __preview__Take 001 + 11100000: //RootNode + materials: + importMaterials: 1 + materialName: 3 + materialSearch: 1 + animations: + legacyGenerateAnimations: 3 + bakeSimulation: 0 + optimizeGameObjects: 0 + animationCompression: 1 + animationRotationError: .5 + animationPositionError: .5 + animationScaleError: .5 + animationWrapMode: 2 + extraExposedTransformPaths: [] + clipAnimations: [] + isReadable: 1 + meshes: + lODScreenPercentages: [] + globalScale: .0130000003 + meshCompression: 0 + addColliders: 0 + importBlendShapes: 1 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + optimizeMeshForGPU: 1 + weldVertices: 1 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + tangentSpace: + normalSmoothAngle: 60 + splitTangentsAcrossUV: 1 + normalImportMode: 0 + tangentImportMode: 1 + importAnimation: 1 + copyAvatar: 0 + humanDescription: + human: [] + skeleton: [] + armTwist: .5 + foreArmTwist: .5 + upperLegTwist: .5 + legTwist: .5 + armStretch: .0500000007 + legStretch: .0500000007 + feetSpacing: 0 + rootMotionBoneName: + lastHumanDescriptionAvatarSource: {instanceID: 0} + animationType: 1 + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc.meta new file mode 100644 index 0000000..1213020 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 282bb665344fe014f957fd7922c70f30 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Bullet.FBX b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Bullet.FBX new file mode 100644 index 0000000..b395d6b Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Bullet.FBX differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Bullet.FBX.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Bullet.FBX.meta new file mode 100644 index 0000000..e4f4bbb --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Bullet.FBX.meta @@ -0,0 +1,63 @@ +fileFormatVersion: 2 +guid: 574d4e5bea2d7f246bf8164d1c47b6d8 +ModelImporter: + serializedVersion: 15 + fileIDToRecycleName: + 100000: //RootNode + 400000: //RootNode + 2300000: //RootNode + 3300000: //RootNode + 4300000: Plane001 + 11100000: //RootNode + materials: + importMaterials: 1 + materialName: 3 + materialSearch: 1 + animations: + legacyGenerateAnimations: 3 + bakeSimulation: 0 + optimizeGameObjects: 0 + animationCompression: 1 + animationRotationError: .5 + animationPositionError: .5 + animationScaleError: .5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + clipAnimations: [] + isReadable: 1 + meshes: + lODScreenPercentages: [] + globalScale: .0799999982 + meshCompression: 0 + addColliders: 0 + importBlendShapes: 1 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + optimizeMeshForGPU: 1 + weldVertices: 1 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + tangentSpace: + normalSmoothAngle: 60 + splitTangentsAcrossUV: 1 + normalImportMode: 0 + tangentImportMode: 1 + importAnimation: 1 + copyAvatar: 0 + humanDescription: + human: [] + skeleton: [] + armTwist: .5 + foreArmTwist: .5 + upperLegTwist: .5 + legTwist: .5 + armStretch: .0500000007 + legStretch: .0500000007 + feetSpacing: 0 + rootMotionBoneName: + lastHumanDescriptionAvatarSource: {instanceID: 0} + animationType: 1 + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Materials.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Materials.meta new file mode 100644 index 0000000..6017e1d --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Materials.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: e8d8fd46dd67c564a8761e0a9dbeb173 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Materials/Bullet-bullet.mat b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Materials/Bullet-bullet.mat new file mode 100644 index 0000000..7b97035 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Materials/Bullet-bullet.mat differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Materials/Bullet-bullet.mat.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Materials/Bullet-bullet.mat.meta new file mode 100644 index 0000000..1ed6291 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Materials/Bullet-bullet.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 6c055f79c6e034b65be556accf6daa36 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Materials/PlaneSmall-lambert2.mat b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Materials/PlaneSmall-lambert2.mat new file mode 100644 index 0000000..594d82f Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Materials/PlaneSmall-lambert2.mat differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Materials/PlaneSmall-lambert2.mat.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Materials/PlaneSmall-lambert2.mat.meta new file mode 100644 index 0000000..0be3918 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Materials/PlaneSmall-lambert2.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 01a4676f80a3044a0a7082b6086b8eba +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Materials/plane-lambert2.mat b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Materials/plane-lambert2.mat new file mode 100644 index 0000000..438285e Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Materials/plane-lambert2.mat differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Materials/plane-lambert2.mat.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Materials/plane-lambert2.mat.meta new file mode 100644 index 0000000..fbe0961 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Materials/plane-lambert2.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: a43bd3ae495384d7e8bbb5f2e9df3fb9 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Plane.fbx b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Plane.fbx new file mode 100644 index 0000000..d51783b Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Plane.fbx differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Plane.fbx.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Plane.fbx.meta new file mode 100644 index 0000000..a2a69e8 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/Plane.fbx.meta @@ -0,0 +1,64 @@ +fileFormatVersion: 2 +guid: e7a62e43c54d44bd78af31fe1202ce68 +ModelImporter: + serializedVersion: 15 + fileIDToRecycleName: + 100000: //RootNode + 400000: //RootNode + 2300000: //RootNode + 2800000: __AssetImporterPreview + 3300000: //RootNode + 4300000: pPlane2 + 11100000: //RootNode + materials: + importMaterials: 1 + materialName: 3 + materialSearch: 1 + animations: + legacyGenerateAnimations: 3 + bakeSimulation: 0 + optimizeGameObjects: 0 + animationCompression: 1 + animationRotationError: .5 + animationPositionError: .5 + animationScaleError: .5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + clipAnimations: [] + isReadable: 1 + meshes: + lODScreenPercentages: [] + globalScale: 1 + meshCompression: 0 + addColliders: 0 + importBlendShapes: 1 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + optimizeMeshForGPU: 1 + weldVertices: 1 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + tangentSpace: + normalSmoothAngle: 60 + splitTangentsAcrossUV: 0 + normalImportMode: 0 + tangentImportMode: 1 + importAnimation: 1 + copyAvatar: 0 + humanDescription: + human: [] + skeleton: [] + armTwist: .5 + foreArmTwist: .5 + upperLegTwist: .5 + legTwist: .5 + armStretch: .0500000007 + legStretch: .0500000007 + feetSpacing: 0 + rootMotionBoneName: + lastHumanDescriptionAvatarSource: {instanceID: 0} + animationType: 1 + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/PlaneSmall.fbx b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/PlaneSmall.fbx new file mode 100644 index 0000000..d51783b Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/PlaneSmall.fbx differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/PlaneSmall.fbx.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/PlaneSmall.fbx.meta new file mode 100644 index 0000000..235b05e --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Misc/PlaneSmall.fbx.meta @@ -0,0 +1,64 @@ +fileFormatVersion: 2 +guid: c3ae12cf00fcf482788b4b27e3558870 +ModelImporter: + serializedVersion: 15 + fileIDToRecycleName: + 100000: //RootNode + 400000: //RootNode + 2300000: //RootNode + 2800000: __AssetImporterPreview + 3300000: //RootNode + 4300000: pPlane2 + 11100000: //RootNode + materials: + importMaterials: 1 + materialName: 3 + materialSearch: 1 + animations: + legacyGenerateAnimations: 3 + bakeSimulation: 0 + optimizeGameObjects: 0 + animationCompression: 1 + animationRotationError: .5 + animationPositionError: .5 + animationScaleError: .5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + clipAnimations: [] + isReadable: 1 + meshes: + lODScreenPercentages: [] + globalScale: .0799999982 + meshCompression: 0 + addColliders: 0 + importBlendShapes: 1 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + optimizeMeshForGPU: 1 + weldVertices: 1 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + tangentSpace: + normalSmoothAngle: 60 + splitTangentsAcrossUV: 0 + normalImportMode: 0 + tangentImportMode: 1 + importAnimation: 1 + copyAvatar: 0 + humanDescription: + human: [] + skeleton: [] + armTwist: .5 + foreArmTwist: .5 + upperLegTwist: .5 + legTwist: .5 + armStretch: .0500000007 + legStretch: .0500000007 + feetSpacing: 0 + rootMotionBoneName: + lastHumanDescriptionAvatarSource: {instanceID: 0} + animationType: 1 + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player.meta new file mode 100644 index 0000000..064e62a --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 0b333964df5fb68459b423c90b9f1680 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/Materials.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/Materials.meta new file mode 100644 index 0000000..29d4687 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/Materials.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: ead423728eb8c8344a1be86bfe8f67ed +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/Materials/muzzleFlash-lambert21.mat b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/Materials/muzzleFlash-lambert21.mat new file mode 100644 index 0000000..28d6896 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/Materials/muzzleFlash-lambert21.mat differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/Materials/muzzleFlash-lambert21.mat.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/Materials/muzzleFlash-lambert21.mat.meta new file mode 100644 index 0000000..24acbb6 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/Materials/muzzleFlash-lambert21.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: ba563644c5a6647a4aad401ce54ac8cc +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/Materials/player-01 - default.mat b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/Materials/player-01 - default.mat new file mode 100644 index 0000000..fe47304 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/Materials/player-01 - default.mat differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/Materials/player-01 - default.mat.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/Materials/player-01 - default.mat.meta new file mode 100644 index 0000000..7370958 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/Materials/player-01 - default.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 57dae6752ad0b7d47b1efb90ad62208c +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/Materials/player-healthglow.mat b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/Materials/player-healthglow.mat new file mode 100644 index 0000000..fdc6537 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/Materials/player-healthglow.mat differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/Materials/player-healthglow.mat.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/Materials/player-healthglow.mat.meta new file mode 100644 index 0000000..2e337b9 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/Materials/player-healthglow.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 819226f6e5961434087c87bab9a2e025 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/MuzzleFlash.fbx b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/MuzzleFlash.fbx new file mode 100644 index 0000000..379638b Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/MuzzleFlash.fbx differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/MuzzleFlash.fbx.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/MuzzleFlash.fbx.meta new file mode 100644 index 0000000..a28bb36 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/MuzzleFlash.fbx.meta @@ -0,0 +1,63 @@ +fileFormatVersion: 2 +guid: 2ad21cc5b2a724b64ba4c729939d59d9 +ModelImporter: + serializedVersion: 15 + fileIDToRecycleName: + 100000: //RootNode + 400000: //RootNode + 2300000: //RootNode + 3300000: //RootNode + 4300000: pPlane441 + 11100000: //RootNode + materials: + importMaterials: 1 + materialName: 3 + materialSearch: 1 + animations: + legacyGenerateAnimations: 0 + bakeSimulation: 0 + optimizeGameObjects: 0 + animationCompression: 1 + animationRotationError: .5 + animationPositionError: .5 + animationScaleError: .5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + clipAnimations: [] + isReadable: 1 + meshes: + lODScreenPercentages: [] + globalScale: .5 + meshCompression: 0 + addColliders: 0 + importBlendShapes: 1 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + optimizeMeshForGPU: 1 + weldVertices: 1 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + tangentSpace: + normalSmoothAngle: 60 + splitTangentsAcrossUV: 1 + normalImportMode: 0 + tangentImportMode: 1 + importAnimation: 1 + copyAvatar: 0 + humanDescription: + human: [] + skeleton: [] + armTwist: .5 + foreArmTwist: .5 + upperLegTwist: .5 + legTwist: .5 + armStretch: .0500000007 + legStretch: .0500000007 + feetSpacing: 0 + rootMotionBoneName: + lastHumanDescriptionAvatarSource: {instanceID: 0} + animationType: 1 + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/Player.FBX b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/Player.FBX new file mode 100644 index 0000000..6773b56 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/Player.FBX differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/Player.FBX.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/Player.FBX.meta new file mode 100644 index 0000000..0ddc420 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Objects/Player/Player.FBX.meta @@ -0,0 +1,306 @@ +fileFormatVersion: 2 +guid: df1f47a0a2effe74488d5da197295a19 +ModelImporter: + serializedVersion: 15 + fileIDToRecycleName: + 100000: //RootNode + 100002: player_root + 100004: Bip001 Footsteps + 100012: Bip001 R Toe0 + 100014: Bip001 R Foot + 100016: Bip001 R Calf + 100018: Bip001 R Thigh + 100020: Bip001 L Toe0 + 100022: Bip001 L Foot + 100024: Bip001 L Calf + 100026: Bip001 L Thigh + 100028: main_weapon001 + 100030: Bip001 R Hand + 100032: Bip001 L Hand + 100034: Bip001 HeadNub + 100036: Bip001 Head + 100038: Bip001 Neck + 100040: Bip001 Spine1 + 100042: Bip001 Spine + 100044: Bip001 Pelvis + 100046: Bip001 + 100048: Bip001 R Toe0Nub + 100050: Bip001 L Toe0Nub + 100052: Bip001 R Finger2Nub + 100054: Bip001 R Finger21 + 100056: Bip001 R Finger2 + 100058: Bip001 R Finger1Nub + 100060: Bip001 R Finger11 + 100062: Bip001 R Finger1 + 100064: Bip001 R Finger0Nub + 100066: Bip001 R Finger01 + 100068: Bip001 R Finger0 + 100070: Bip001 R Forearm + 100072: Bip001 R UpperArm + 100074: Bip001 R Clavicle + 100076: Bip001 L Finger2Nub + 100078: Bip001 L Finger21 + 100080: Bip001 L Finger2 + 100082: Bip001 L Finger1Nub + 100084: Bip001 L Finger11 + 100086: Bip001 L Finger1 + 100088: Bip001 L Finger0Nub + 100090: Bip001 L Finger01 + 100092: Bip001 L Finger0 + 100094: Bip001 L Forearm + 100096: Bip001 L UpperArm + 100098: Bip001 L Clavicle + 100100: main_player_lorez + 400000: //RootNode + 400002: player_root + 400004: Bip001 Footsteps + 400012: Bip001 R Toe0 + 400014: Bip001 R Foot + 400016: Bip001 R Calf + 400018: Bip001 R Thigh + 400020: Bip001 L Toe0 + 400022: Bip001 L Foot + 400024: Bip001 L Calf + 400026: Bip001 L Thigh + 400028: main_weapon001 + 400030: Bip001 R Hand + 400032: Bip001 L Hand + 400034: Bip001 HeadNub + 400036: Bip001 Head + 400038: Bip001 Neck + 400040: Bip001 Spine1 + 400042: Bip001 Spine + 400044: Bip001 Pelvis + 400046: Bip001 + 400048: Bip001 R Toe0Nub + 400050: Bip001 L Toe0Nub + 400052: Bip001 R Finger2Nub + 400054: Bip001 R Finger21 + 400056: Bip001 R Finger2 + 400058: Bip001 R Finger1Nub + 400060: Bip001 R Finger11 + 400062: Bip001 R Finger1 + 400064: Bip001 R Finger0Nub + 400066: Bip001 R Finger01 + 400068: Bip001 R Finger0 + 400070: Bip001 R Forearm + 400072: Bip001 R UpperArm + 400074: Bip001 R Clavicle + 400076: Bip001 L Finger2Nub + 400078: Bip001 L Finger21 + 400080: Bip001 L Finger2 + 400082: Bip001 L Finger1Nub + 400084: Bip001 L Finger11 + 400086: Bip001 L Finger1 + 400088: Bip001 L Finger0Nub + 400090: Bip001 L Finger01 + 400092: Bip001 L Finger0 + 400094: Bip001 L Forearm + 400096: Bip001 L UpperArm + 400098: Bip001 L Clavicle + 400100: main_player_lorez + 2300010: main_weapon001 + 3300010: main_weapon001 + 4300000: main_player_lorez + 4300002: main_weapon001 + 4300004: Cylinder001 + 4300006: Cylinder002 + 4300008: Cylinder003 + 4300010: Cylinder004 + 4300012: Cylinder005 + 4300014: healthbar + 7400030: idle + 7400032: run_forward + 7400034: run_backward + 7400036: run_right + 7400038: run_left + 7400040: __preview__Take 001 + 7400042: + 7400044: + 7400046: + 7400048: + 7400050: + 11100000: //RootNode + 13700000: main_player_lorez + materials: + importMaterials: 1 + materialName: 3 + materialSearch: 1 + animations: + legacyGenerateAnimations: 3 + bakeSimulation: 0 + optimizeGameObjects: 0 + animationCompression: 1 + animationRotationError: .100000001 + animationPositionError: .5 + animationScaleError: .5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + clipAnimations: + - serializedVersion: 16 + name: idle + takeName: + firstFrame: 0 + lastFrame: 74 + wrapMode: 2 + orientationOffsetY: 0 + level: 0 + cycleOffset: 0 + loop: 1 + loopTime: 0 + loopBlend: 0 + loopBlendOrientation: 0 + loopBlendPositionY: 0 + loopBlendPositionXZ: 0 + keepOriginalOrientation: 0 + keepOriginalPositionY: 1 + keepOriginalPositionXZ: 0 + heightFromFeet: 0 + mirror: 0 + bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000 + curves: [] + events: [] + transformMask: [] + maskType: 0 + maskSource: {instanceID: 0} + - serializedVersion: 16 + name: run_forward + takeName: + firstFrame: 76 + lastFrame: 94 + wrapMode: 2 + orientationOffsetY: 0 + level: 0 + cycleOffset: 0 + loop: 1 + loopTime: 0 + loopBlend: 0 + loopBlendOrientation: 0 + loopBlendPositionY: 0 + loopBlendPositionXZ: 0 + keepOriginalOrientation: 0 + keepOriginalPositionY: 1 + keepOriginalPositionXZ: 0 + heightFromFeet: 0 + mirror: 0 + bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000 + curves: [] + events: [] + transformMask: [] + maskType: 0 + maskSource: {instanceID: 0} + - serializedVersion: 16 + name: run_backward + takeName: + firstFrame: 96 + lastFrame: 114 + wrapMode: 2 + orientationOffsetY: 0 + level: 0 + cycleOffset: 0 + loop: 1 + loopTime: 0 + loopBlend: 0 + loopBlendOrientation: 0 + loopBlendPositionY: 0 + loopBlendPositionXZ: 0 + keepOriginalOrientation: 0 + keepOriginalPositionY: 1 + keepOriginalPositionXZ: 0 + heightFromFeet: 0 + mirror: 0 + bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000 + curves: [] + events: [] + transformMask: [] + maskType: 0 + maskSource: {instanceID: 0} + - serializedVersion: 16 + name: run_right + takeName: + firstFrame: 116 + lastFrame: 134 + wrapMode: 2 + orientationOffsetY: 0 + level: 0 + cycleOffset: 0 + loop: 1 + loopTime: 0 + loopBlend: 0 + loopBlendOrientation: 0 + loopBlendPositionY: 0 + loopBlendPositionXZ: 0 + keepOriginalOrientation: 0 + keepOriginalPositionY: 1 + keepOriginalPositionXZ: 0 + heightFromFeet: 0 + mirror: 0 + bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000 + curves: [] + events: [] + transformMask: [] + maskType: 0 + maskSource: {instanceID: 0} + - serializedVersion: 16 + name: run_left + takeName: + firstFrame: 136 + lastFrame: 154 + wrapMode: 2 + orientationOffsetY: 0 + level: 0 + cycleOffset: 0 + loop: 1 + loopTime: 0 + loopBlend: 0 + loopBlendOrientation: 0 + loopBlendPositionY: 0 + loopBlendPositionXZ: 0 + keepOriginalOrientation: 0 + keepOriginalPositionY: 1 + keepOriginalPositionXZ: 0 + heightFromFeet: 0 + mirror: 0 + bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000 + curves: [] + events: [] + transformMask: [] + maskType: 0 + maskSource: {instanceID: 0} + isReadable: 1 + meshes: + lODScreenPercentages: [] + globalScale: .0120000001 + meshCompression: 0 + addColliders: 0 + importBlendShapes: 1 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + optimizeMeshForGPU: 1 + weldVertices: 1 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + tangentSpace: + normalSmoothAngle: 60 + splitTangentsAcrossUV: 1 + normalImportMode: 0 + tangentImportMode: 1 + importAnimation: 1 + copyAvatar: 0 + humanDescription: + human: [] + skeleton: [] + armTwist: .5 + foreArmTwist: .5 + upperLegTwist: .5 + legTwist: .5 + armStretch: .0500000007 + legStretch: .0500000007 + feetSpacing: 0 + rootMotionBoneName: + lastHumanDescriptionAvatarSource: {instanceID: 0} + animationType: 1 + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/PhysicMaterials.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/PhysicMaterials.meta new file mode 100644 index 0000000..940598b --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/PhysicMaterials.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 93572dd6591d1ed4b927c6b0efff59c9 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/PhysicMaterials/Enemy.physicMaterial b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/PhysicMaterials/Enemy.physicMaterial new file mode 100644 index 0000000..7a0cffd Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/PhysicMaterials/Enemy.physicMaterial differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/PhysicMaterials/Enemy.physicMaterial.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/PhysicMaterials/Enemy.physicMaterial.meta new file mode 100644 index 0000000..80d4e00 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/PhysicMaterials/Enemy.physicMaterial.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 57855795a303942438ffe7b982db920a +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/PhysicMaterials/Frictionless.physicMaterial b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/PhysicMaterials/Frictionless.physicMaterial new file mode 100644 index 0000000..cca3cf9 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/PhysicMaterials/Frictionless.physicMaterial differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/PhysicMaterials/Frictionless.physicMaterial.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/PhysicMaterials/Frictionless.physicMaterial.meta new file mode 100644 index 0000000..8fa58e6 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/PhysicMaterials/Frictionless.physicMaterial.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: d35b37e7667d34205b83e85449b6d6a4 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs.meta new file mode 100644 index 0000000..b93d0fe --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 0a0928d2ccc16f84faacff785430b418 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Enemies.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Enemies.meta new file mode 100644 index 0000000..a6aae71 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Enemies.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 741a5ab4ed8b5944abcf85eeb8b8665b +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Enemies/EnemySpider.prefab b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Enemies/EnemySpider.prefab new file mode 100644 index 0000000..782c93a Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Enemies/EnemySpider.prefab differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Enemies/EnemySpider.prefab.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Enemies/EnemySpider.prefab.meta new file mode 100644 index 0000000..70dd571 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Enemies/EnemySpider.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 61a8f246d5c514f18b5ff0a0f28693b0 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Enemies/spiderScorchMark.prefab b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Enemies/spiderScorchMark.prefab new file mode 100644 index 0000000..bd38c86 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Enemies/spiderScorchMark.prefab differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Enemies/spiderScorchMark.prefab.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Enemies/spiderScorchMark.prefab.meta new file mode 100644 index 0000000..01d71e4 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Enemies/spiderScorchMark.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 48cdb930df2e54565971b0f4c9e3ceb2 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Misc.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Misc.meta new file mode 100644 index 0000000..9568917 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Misc.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: e6b9ef83c63a02d4a91d57114dbea0a3 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Misc/Joystick.prefab b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Misc/Joystick.prefab new file mode 100644 index 0000000..2040b6f Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Misc/Joystick.prefab differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Misc/Joystick.prefab.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Misc/Joystick.prefab.meta new file mode 100644 index 0000000..7b2d790 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Misc/Joystick.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 76305b7830af34f949acf9d383cf2f74 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Player.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Player.meta new file mode 100644 index 0000000..50c1d4e --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Player.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: e8b78b23d993c1c4b8e168f511eeba4d +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Player/Cursor.prefab b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Player/Cursor.prefab new file mode 100644 index 0000000..2207c1c Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Player/Cursor.prefab differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Player/Cursor.prefab.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Player/Cursor.prefab.meta new file mode 100644 index 0000000..17324fe --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Player/Cursor.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 2dd326d33d99a491289f9402ad97bcc1 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Player/PlayerPrefab.prefab b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Player/PlayerPrefab.prefab new file mode 100644 index 0000000..c6680d3 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Player/PlayerPrefab.prefab differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Player/PlayerPrefab.prefab.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Player/PlayerPrefab.prefab.meta new file mode 100644 index 0000000..0fb2f3f --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Player/PlayerPrefab.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: a8244aeb156024dfbae1997ab0ee2745 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Weapons.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Weapons.meta new file mode 100644 index 0000000..8f2cfc1 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Weapons.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 5a30de7ed04c705438cc6ddb7dbbad43 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Weapons/InstantBullet.prefab b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Weapons/InstantBullet.prefab new file mode 100644 index 0000000..df2f8a7 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Weapons/InstantBullet.prefab differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Weapons/InstantBullet.prefab.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Weapons/InstantBullet.prefab.meta new file mode 100644 index 0000000..922cd54 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Prefabs/Weapons/InstantBullet.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 647e7d9f49e834c51991c6bd76163b2b +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts.meta new file mode 100644 index 0000000..0bc9cb3 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 3c5ea3d1cf5d1de438d71ed957d6740e +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI.meta new file mode 100644 index 0000000..8c07116 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: ba2fdd7bbd1e51843a9ae08e7fa309ca +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI/AI.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI/AI.js new file mode 100644 index 0000000..a61d9ad --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI/AI.js @@ -0,0 +1,67 @@ +#pragma strict + +// Public member data +public var behaviourOnSpotted : MonoBehaviour; +public var soundOnSpotted : AudioClip; +public var behaviourOnLostTrack : MonoBehaviour; + +// Private memeber data +private var character : Transform; +private var player : Transform; +private var insideInterestArea : boolean = true; + +function Awake () { + character = transform; + player = GameObject.FindWithTag ("Player").transform; +} + +function OnEnable () { + behaviourOnLostTrack.enabled = true; + behaviourOnSpotted.enabled = false; +} + +function OnTriggerEnter (other : Collider) { + if (other.transform == player && CanSeePlayer ()) { + OnSpotted (); + } +} + +function OnEnterInterestArea () { + insideInterestArea = true; +} + +function OnExitInterestArea () { + insideInterestArea = false; + OnLostTrack (); +} + +function OnSpotted () { + if (!insideInterestArea) + return; + if (!behaviourOnSpotted.enabled) { + behaviourOnSpotted.enabled = true; + behaviourOnLostTrack.enabled = false; + + if (GetComponent.() && soundOnSpotted) { + GetComponent.().clip = soundOnSpotted; + GetComponent.().Play (); + } + } +} + +function OnLostTrack () { + if (!behaviourOnLostTrack.enabled) { + behaviourOnLostTrack.enabled = true; + behaviourOnSpotted.enabled = false; + } +} + +function CanSeePlayer () : boolean { + var playerDirection : Vector3 = (player.position - character.position); + var hit : RaycastHit; + Physics.Raycast (character.position, playerDirection, hit, playerDirection.magnitude); + if (hit.collider && hit.collider.transform == player) { + return true; + } + return false; +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI/AI.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI/AI.js.meta new file mode 100644 index 0000000..a54ae89 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI/AI.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: eb6e22f32d1ef42f28882da13fb49f4b +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI/DisableOutsideRadius.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI/DisableOutsideRadius.js new file mode 100644 index 0000000..ab55a88 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI/DisableOutsideRadius.js @@ -0,0 +1,41 @@ +#pragma strict + +@script RequireComponent (SphereCollider) + +private var target : GameObject; +private var sphereCollider : SphereCollider; +private var activeRadius : float; + +function Awake () { + target = transform.parent.gameObject; + sphereCollider = GetComponent. (); + activeRadius = sphereCollider.radius; + + Disable (); +} + +function OnTriggerEnter (other : Collider) { + if (other.tag == "Player" && target.transform.parent == transform) { + Enable (); + } +} + +function OnTriggerExit (other : Collider) { + if (other.tag == "Player") { + Disable (); + } +} + +function Disable () { + transform.parent = target.transform.parent; + target.transform.parent = transform; + target.SetActive (false); + sphereCollider.radius = activeRadius; +} + +function Enable () { + target.transform.parent = transform.parent; + target.SetActive (true); + transform.parent = target.transform; + sphereCollider.radius = activeRadius * 1.1; +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI/DisableOutsideRadius.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI/DisableOutsideRadius.js.meta new file mode 100644 index 0000000..b7f3a13 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI/DisableOutsideRadius.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: de5c6e70ca9d046ceae3e8a5bab50c32 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI/PatrolPoint.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI/PatrolPoint.js new file mode 100644 index 0000000..36649b6 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI/PatrolPoint.js @@ -0,0 +1,7 @@ +#pragma strict + +var position : Vector3; + +function Awake () { + position = transform.position; +} \ No newline at end of file diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI/PatrolPoint.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI/PatrolPoint.js.meta new file mode 100644 index 0000000..3676323 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI/PatrolPoint.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9a404b899ecb54ee6892c1beef12a693 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI/SpiderAttackMoveController.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI/SpiderAttackMoveController.js new file mode 100644 index 0000000..63e6856 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI/SpiderAttackMoveController.js @@ -0,0 +1,142 @@ +#pragma strict + +// Public member data +public var motor : MovementMotor; + +public var targetDistanceMin : float = 2.0; +public var targetDistanceMax : float = 3.0; +public var proximityDistance : float = 4.0; +public var damageRadius : float = 5.0; +public var proximityBuildupTime : float = 2.0; +public var proximityOfNoReturn : float = 0.6; +public var damageAmount : float = 30.0; +public var proximityRenderer : Renderer; +public var audioSource : AudioSource; +public var blinkComponents : SelfIlluminationBlink[]; +public var blinkPlane : GlowPlane; + +public var intentionalExplosion : GameObject; +public var animationBehaviour : MonoBehaviour; + +// Private memeber data +private var ai : AI; + +private var character : Transform; + +private var player : Transform; + +private var inRange : boolean = false; +private var nextRaycastTime : float = 0; +private var lastRaycastSuccessfulTime : float = 0; +private var proximityLevel : float = 0; +private var lastBlinkTime : float = 0; +private var noticeTime : float = 0; + +function Awake () { + character = motor.transform; + player = GameObject.FindWithTag ("Player").transform; + ai = transform.parent.GetComponentInChildren. (); + if (!blinkComponents.Length) + blinkComponents = transform.parent.GetComponentsInChildren. (); +} + +function OnEnable () { + inRange = false; + nextRaycastTime = Time.time; + lastRaycastSuccessfulTime = Time.time; + noticeTime = Time.time; + animationBehaviour.enabled = true; + if (blinkPlane) + blinkPlane.GetComponent.().enabled = false; +} + +function OnDisable () { + if (proximityRenderer == null) + Debug.LogError ("proximityRenderer is null", this); + else if (proximityRenderer.material == null) + Debug.LogError ("proximityRenderer.material is null", this); + else + proximityRenderer.material.color = Color.white; + if (blinkPlane) + blinkPlane.GetComponent.().enabled = false; +} + +function Update () { + if (Time.time < noticeTime + 0.7) { + motor.movementDirection = Vector3.zero; + return; + } + + // Calculate the direction from the player to this character + var playerDirection : Vector3 = (player.position - character.position); + playerDirection.y = 0; + var playerDist : float = playerDirection.magnitude; + playerDirection /= playerDist; + + // Set this character to face the player, + // that is, to face the direction from this character to the player + //motor.facingDirection = playerDirection; + + if (inRange && playerDist > targetDistanceMax) + inRange = false; + if (!inRange && playerDist < targetDistanceMin) + inRange = true; + + if (inRange) + motor.movementDirection = Vector3.zero; + else + motor.movementDirection = playerDirection; + + if ((playerDist < proximityDistance && Time.time < lastRaycastSuccessfulTime + 1) || proximityLevel > proximityOfNoReturn) + proximityLevel += Time.deltaTime / proximityBuildupTime; + else + proximityLevel -= Time.deltaTime / proximityBuildupTime; + + proximityLevel = Mathf.Clamp01 (proximityLevel); + //proximityRenderer.material.color = Color.Lerp (Color.blue, Color.red, proximityLevel); + if (proximityLevel == 1) + Explode (); + + if (Time.time > nextRaycastTime) { + nextRaycastTime = Time.time + 1; + if (ai.CanSeePlayer ()) { + lastRaycastSuccessfulTime = Time.time; + } + else { + if (Time.time > lastRaycastSuccessfulTime + 2) { + ai.OnLostTrack (); + } + } + } + + var deltaBlink = 1 / Mathf.Lerp (2, 15, proximityLevel); + if (Time.time > lastBlinkTime + deltaBlink) { + lastBlinkTime = Time.time; + proximityRenderer.material.color = Color.red; + if (audioSource.enabled) + { + audioSource.Play (); + } + for (var comp : SelfIlluminationBlink in blinkComponents) { + comp.Blink (); + } + if (blinkPlane) + blinkPlane.GetComponent.().enabled = !blinkPlane.GetComponent.().enabled; + } + if (Time.time > lastBlinkTime + 0.04) { + proximityRenderer.material.color = Color.white; + } +} + +function Explode () { + var damageFraction : float = 1 - (Vector3.Distance (player.position, character.position) / damageRadius); + + var targetHealth : Health = player.GetComponent. (); + if (targetHealth) { + // Apply damage + targetHealth.OnDamage (damageAmount * damageFraction, character.position - player.position); + } + player.GetComponent.().AddExplosionForce (10, character.position, damageRadius, 0.0, ForceMode.Impulse); + Spawner.Spawn (intentionalExplosion, transform.position, Quaternion.identity); + Spawner.Destroy (character.gameObject); +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI/SpiderAttackMoveController.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI/SpiderAttackMoveController.js.meta new file mode 100644 index 0000000..a0a62bc --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI/SpiderAttackMoveController.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a1faac4a799dd4e8bb9040d595af2ae1 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI/SpiderReturnMoveController.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI/SpiderReturnMoveController.js new file mode 100644 index 0000000..7e827b7 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI/SpiderReturnMoveController.js @@ -0,0 +1,33 @@ +#pragma strict + +// Public member data +public var motor : MovementMotor; + +// Private memeber data +private var ai : AI; + +private var character : Transform; +private var spawnPos : Vector3; +public var animationBehaviour : MonoBehaviour; + +function Awake () { + character = motor.transform; + ai = transform.parent.GetComponentInChildren. (); + spawnPos = character.position; +} + +function Update () { + motor.movementDirection = spawnPos - character.position; + motor.movementDirection.y = 0; + if (motor.movementDirection.sqrMagnitude > 1) + motor.movementDirection = motor.movementDirection.normalized; + + if (motor.movementDirection.sqrMagnitude < 0.01) { + character.position = new Vector3 (spawnPos.x, character.position.y, spawnPos.z); + motor.GetComponent.().velocity = Vector3.zero; + motor.GetComponent.().angularVelocity = Vector3.zero; + motor.movementDirection = Vector3.zero; + enabled = false; + animationBehaviour.enabled = false; + } +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI/SpiderReturnMoveController.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI/SpiderReturnMoveController.js.meta new file mode 100644 index 0000000..18c7330 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/AI/SpiderReturnMoveController.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e2cda9a06a2cf41a8a847fcf1331d16f +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation.meta new file mode 100644 index 0000000..47f4f0b --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: c7b84ff7f6b13fe46b7cbdf142faa8fb +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/FanRotate.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/FanRotate.js new file mode 100644 index 0000000..a8e86d2 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/FanRotate.js @@ -0,0 +1,25 @@ + +#pragma strict + +var thisMesh : Mesh; +var uvs : Vector2[]; + +#if !UNITY_IPHONE && !UNITY_ANDROID && !UNITY_WP8 && !UNITY_BLACKBERRY + +function Start () +{ + thisMesh = GetComponent(MeshFilter).mesh; + uvs = thisMesh.uv; +} + +function Update() +{ + for (var i : int = 0; i < uvs.length; i++) + { + uvs[i].y = (uvs[i].y + 0.25); + } + + thisMesh.uv = uvs; +} + +#endif \ No newline at end of file diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/FanRotate.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/FanRotate.js.meta new file mode 100644 index 0000000..7021b7b --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/FanRotate.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 37d43fa7d421646219d39ea5722cfe68 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/FootstepHandler.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/FootstepHandler.js new file mode 100644 index 0000000..f21972c --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/FootstepHandler.js @@ -0,0 +1,38 @@ +#pragma strict + +enum FootType { + Player, + Mech, + Spider +} + +var audioSource : AudioSource; +var footType : FootType; + +private var physicMaterial : PhysicMaterial; + +function OnCollisionEnter (collisionInfo : Collision) { + physicMaterial = collisionInfo.collider.sharedMaterial; +} + +function OnFootstep () { + if (!audioSource.enabled) + { + return; + } + + var sound : AudioClip; + switch (footType) { + case FootType.Player: + //sound = MaterialImpactManager.GetPlayerFootstepSound (physicMaterial); + break; + case FootType.Mech: + //sound = MaterialImpactManager.GetMechFootstepSound (physicMaterial); + break; + case FootType.Spider: + //sound = MaterialImpactManager.GetSpiderFootstepSound (physicMaterial); + break; + } + audioSource.pitch = Random.Range (0.98, 1.02); + audioSource.PlayOneShot (sound, Random.Range (0.8, 1.2)); +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/FootstepHandler.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/FootstepHandler.js.meta new file mode 100644 index 0000000..cbec66f --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/FootstepHandler.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0d9ca0c66e3ba47f7aa60403bd613485 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/MechAnimation.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/MechAnimation.js new file mode 100644 index 0000000..197b6aa --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/MechAnimation.js @@ -0,0 +1,60 @@ +#pragma strict + +var rigid : Rigidbody; +var idle : AnimationClip; +var walk : AnimationClip; +var turnLeft : AnimationClip; +var turnRight : AnimationClip; +var footstepSignals : SignalSender; + +private var tr : Transform; +private var lastFootstepTime : float = 0; +private var lastAnimTime : float = 0; + +function OnEnable () { + tr = rigid.transform; + + GetComponent.()[idle.name].layer = 0; + GetComponent.()[idle.name].weight = 1; + GetComponent.()[idle.name].enabled = true; + + GetComponent.()[walk.name].layer = 1; + GetComponent.()[turnLeft.name].layer = 1; + GetComponent.()[turnRight.name].layer = 1; + + GetComponent.()[walk.name].weight = 1; + GetComponent.()[turnLeft.name].weight = 0; + GetComponent.()[turnRight.name].weight = 0; + + GetComponent.()[walk.name].enabled = true; + GetComponent.()[turnLeft.name].enabled = true; + GetComponent.()[turnRight.name].enabled = true; + + //animation.SyncLayer (1); +} + +function FixedUpdate () { + var turningWeight : float = Mathf.Abs (rigid.angularVelocity.y) * Mathf.Rad2Deg / 100.0; + var forwardWeight : float = rigid.velocity.magnitude / 2.5; + var turningDir : float = Mathf.Sign (rigid.angularVelocity.y); + + // Temp, until we get the animations fixed + GetComponent.()[walk.name].speed = Mathf.Lerp (1.0, GetComponent.()[walk.name].length / GetComponent.()[turnLeft.name].length * 1.33, turningWeight); + GetComponent.()[turnLeft.name].time = GetComponent.()[walk.name].time; + GetComponent.()[turnRight.name].time = GetComponent.()[walk.name].time; + + GetComponent.()[turnLeft.name].weight = Mathf.Clamp01 (-turningWeight * turningDir); + GetComponent.()[turnRight.name].weight = Mathf.Clamp01 (turningWeight * turningDir); + GetComponent.()[walk.name].weight = Mathf.Clamp01 (forwardWeight); + + if (forwardWeight + turningWeight > 0.1) { + var newAnimTime = Mathf.Repeat (GetComponent.()[walk.name].normalizedTime * 2 + 0.1, 1); + if (newAnimTime < lastAnimTime) { + if (Time.time > lastFootstepTime + 0.1) { + footstepSignals.SendSignals (this); + lastFootstepTime = Time.time; + } + } + lastAnimTime = newAnimTime; + } +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/MechAnimation.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/MechAnimation.js.meta new file mode 100644 index 0000000..ee5686c --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/MechAnimation.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5f9ba405be8854d2fade944b8c9f823f +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/MechAnimationTest.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/MechAnimationTest.js new file mode 100644 index 0000000..d521bce --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/MechAnimationTest.js @@ -0,0 +1,78 @@ +#pragma strict + +#if !UNITY_FLASH + +var turning : float = 0; +var walking : float = 0; +var turnOffset : float = 0.0; + +var rigid : Rigidbody; +var idle : AnimationClip; +var walk : AnimationClip; +var turnLeft : AnimationClip; +var turnRight : AnimationClip; +var footstepSignals : SignalSender; + +function OnEnable () { + + GetComponent.()[idle.name].layer = 0; + GetComponent.()[idle.name].weight = 1; + GetComponent.()[idle.name].enabled = true; + + GetComponent.()[walk.name].layer = 1; + GetComponent.()[turnLeft.name].layer = 1; + GetComponent.()[turnRight.name].layer = 1; + + GetComponent.()[walk.name].weight = 1; + GetComponent.()[turnLeft.name].weight = 0; + GetComponent.()[turnRight.name].weight = 0; + + GetComponent.()[walk.name].enabled = true; + GetComponent.()[turnLeft.name].enabled = true; + GetComponent.()[turnRight.name].enabled = true; + + //animation[walk.name].speed = 0.93; + + //animation.Play (); +} + +function FixedUpdate () { + GetComponent.()[walk.name].speed = Mathf.Lerp (1, GetComponent.()[walk.name].length / GetComponent.()[turnLeft.name].length, Mathf.Abs (turning)); + + GetComponent.()[turnLeft.name].time = GetComponent.()[walk.name].time + turnOffset; + GetComponent.()[turnRight.name].time = GetComponent.()[walk.name].time + turnOffset; + + rigid.velocity = rigid.transform.forward * 2.5 * walking; + rigid.angularVelocity = Vector3.up * turning * 100 * Mathf.Deg2Rad; + + var turningWeight : float = rigid.angularVelocity.y * Mathf.Rad2Deg / 100.0; + var forwardWeight : float = rigid.velocity.magnitude / 2.5; + + GetComponent.()[turnLeft.name].weight = Mathf.Clamp01 (-turningWeight); + GetComponent.()[turnRight.name].weight = Mathf.Clamp01 (turningWeight); + GetComponent.()[walk.name].weight = Mathf.Clamp01 (forwardWeight); +} + +function OnGUI () { + GUILayout.Label ("Walking (0 to 1): "+walking.ToString("0.00")); + walking = GUILayout.HorizontalSlider (walking, 0, 1, GUILayout.Width (100)); + if (GUI.changed) { + turning = Mathf.Clamp (Mathf.Abs (turning), 0, 1 - walking) * Mathf.Sign (turning); + GUI.changed = false; + } + + GUILayout.Label ("Turning (-1 to 1): "+turning.ToString("0.00")); + turning = GUILayout.HorizontalSlider (turning, -1, 1, GUILayout.Width (100)); + if (Mathf.Abs (turning) < 0.1) + turning = 0; + if (GUI.changed) { + walking = Mathf.Clamp (walking, 0, 1 - Mathf.Abs (turning)); + GUI.changed = false; + } + + GUILayout.Label ("Offset to turning anims (-0.5 to 0.5): "+turnOffset.ToString("0.00")); + turnOffset = GUILayout.HorizontalSlider (turnOffset, -0.5, 0.5, GUILayout.Width (100)); + if (Mathf.Abs (turnOffset) < 0.05) + turnOffset = 0; +} +#endif \ No newline at end of file diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/MechAnimationTest.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/MechAnimationTest.js.meta new file mode 100644 index 0000000..d0833e4 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/MechAnimationTest.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5f34d48cfe767425d8421958a93d358a +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/PlayerAnimation.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/PlayerAnimation.js new file mode 100644 index 0000000..b242da7 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/PlayerAnimation.js @@ -0,0 +1,206 @@ +#pragma strict + +class MoveAnimation { + // The animation clip + var clip : AnimationClip; + + // The velocity of the walk or run cycle in this clip + var velocity : Vector3; + + // Store the current weight of this animation + @HideInInspector + public var weight : float; + + // Keep track of whether this animation is currently the best match + @HideInInspector + public var currentBest : boolean = false; + + // The speed and angle is directly derived from the velocity, + // but since it's slightly expensive to calculate them + // we do it once in the beginning instead of in every frame. + @HideInInspector + public var speed : float; + @HideInInspector + public var angle : float; + + public function Init () { + velocity.y = 0; + speed = velocity.magnitude; + angle = PlayerAnimation.HorizontalAngle (velocity); + } +} + +var rigid : Rigidbody; +var rootBone : Transform; +var upperBodyBone : Transform; +var maxIdleSpeed : float = 0.5; +var minWalkSpeed : float = 2.0; +var idle : AnimationClip; +var turn : AnimationClip; +var shootAdditive : AnimationClip; +var moveAnimations : MoveAnimation[]; +var footstepSignals : SignalSender; + +private var tr : Transform; +private var lastPosition : Vector3 = Vector3.zero; +private var velocity : Vector3 = Vector3.zero; +private var localVelocity : Vector3 = Vector3.zero; +private var speed : float = 0; +private var angle : float = 0; +private var lowerBodyDeltaAngle : float = 0; +private var idleWeight : float = 0; +private var lowerBodyForwardTarget : Vector3 = Vector3.forward; +private var lowerBodyForward : Vector3 = Vector3.forward; +private var bestAnimation : MoveAnimation = null; +private var lastFootstepTime : float = 0; +private var lastAnimTime : float = 0; + +public var animationComponent : Animation; + +function Awake () { + tr = rigid.transform; + lastPosition = tr.position; + + for (var moveAnimation : MoveAnimation in moveAnimations) { + moveAnimation.Init (); + animationComponent[moveAnimation.clip.name].layer = 1; + animationComponent[moveAnimation.clip.name].enabled = true; + } + animationComponent.SyncLayer (1); + + animationComponent[idle.name].layer = 2; + animationComponent[turn.name].layer = 3; + animationComponent[idle.name].enabled = true; + + animationComponent[shootAdditive.name].layer = 4; + animationComponent[shootAdditive.name].weight = 1; + animationComponent[shootAdditive.name].speed = 0.6; + animationComponent[shootAdditive.name].blendMode = AnimationBlendMode.Additive; + + //animation[turn.name].enabled = true; +} + +function OnStartFire () { + if (Time.timeScale == 0) + return; + + animationComponent[shootAdditive.name].enabled = true; +} + +function OnStopFire () { + animationComponent[shootAdditive.name].enabled = false; +} + +function FixedUpdate () { + velocity = (tr.position - lastPosition) / Time.deltaTime; + localVelocity = tr.InverseTransformDirection (velocity); + localVelocity.y = 0; + speed = localVelocity.magnitude; + angle = HorizontalAngle (localVelocity); + + lastPosition = tr.position; +} + +function Update () { + idleWeight = Mathf.Lerp (idleWeight, Mathf.InverseLerp (minWalkSpeed, maxIdleSpeed, speed), Time.deltaTime * 10); + animationComponent[idle.name].weight = idleWeight; + + if (speed > 0) { + var smallestDiff : float = Mathf.Infinity; + for (var moveAnimation : MoveAnimation in moveAnimations) { + var angleDiff : float = Mathf.Abs(Mathf.DeltaAngle (angle, moveAnimation.angle)); + var speedDiff : float = Mathf.Abs (speed - moveAnimation.speed); + var diff : float = angleDiff + speedDiff; + if (moveAnimation == bestAnimation) + diff *= 0.9; + + if (diff < smallestDiff) { + bestAnimation = moveAnimation; + smallestDiff = diff; + } + } + + animationComponent.CrossFade (bestAnimation.clip.name); + } + else { + bestAnimation = null; + } + + if (lowerBodyForward != lowerBodyForwardTarget && idleWeight >= 0.9) + animationComponent.CrossFade (turn.name, 0.05); + + if (bestAnimation && idleWeight < 0.9) { + var newAnimTime = Mathf.Repeat (animationComponent[bestAnimation.clip.name].normalizedTime * 2 + 0.1, 1); + if (newAnimTime < lastAnimTime) { + if (Time.time > lastFootstepTime + 0.1) { + footstepSignals.SendSignals (this); + lastFootstepTime = Time.time; + } + } + lastAnimTime = newAnimTime; + } +} + +function LateUpdate () { + var idle : float = Mathf.InverseLerp (minWalkSpeed, maxIdleSpeed, speed); + + if (idle < 1) { + // Calculate a weighted average of the animation velocities that are currently used + var animatedLocalVelocity : Vector3 = Vector3.zero; + for (var moveAnimation : MoveAnimation in moveAnimations) { + // Ignore this animation if its weight is 0 + if (animationComponent[moveAnimation.clip.name].weight == 0) + continue; + + // Ignore this animation if its velocity is more than 90 degrees away from current velocity + if (Vector3.Dot (moveAnimation.velocity, localVelocity) <= 0) + continue; + + // Add velocity of this animation to the weighted average + animatedLocalVelocity += moveAnimation.velocity * animationComponent[moveAnimation.clip.name].weight; + } + + // Calculate target angle to rotate lower body by in order + // to make feet run in the direction of the velocity + var lowerBodyDeltaAngleTarget : float = Mathf.DeltaAngle ( + HorizontalAngle (tr.rotation * animatedLocalVelocity), + HorizontalAngle (velocity) + ); + + // Lerp the angle to smooth it a bit + lowerBodyDeltaAngle = Mathf.LerpAngle (lowerBodyDeltaAngle, lowerBodyDeltaAngleTarget, Time.deltaTime * 10); + + // Update these so they're ready for when we go into idle + lowerBodyForwardTarget = tr.forward; + lowerBodyForward = Quaternion.Euler (0, lowerBodyDeltaAngle, 0) * lowerBodyForwardTarget; + } + else { + // Turn the lower body towards it's target direction + lowerBodyForward = Vector3.RotateTowards (lowerBodyForward, lowerBodyForwardTarget, Time.deltaTime * 520 * Mathf.Deg2Rad, 1); + + // Calculate delta angle to make the lower body stay in place + lowerBodyDeltaAngle = Mathf.DeltaAngle ( + HorizontalAngle (tr.forward), + HorizontalAngle (lowerBodyForward) + ); + + // If the body is twisted more than 80 degrees, + // set a new target direction for the lower body, so it begins turning + if (Mathf.Abs(lowerBodyDeltaAngle) > 80) + lowerBodyForwardTarget = tr.forward; + } + + // Create a Quaternion rotation from the rotation angle + var lowerBodyDeltaRotation : Quaternion = Quaternion.Euler (0, lowerBodyDeltaAngle, 0); + + // Rotate the whole body by the angle + rootBone.rotation = lowerBodyDeltaRotation * rootBone.rotation; + + // Counter-rotate the upper body so it won't be affected + upperBodyBone.rotation = Quaternion.Inverse (lowerBodyDeltaRotation) * upperBodyBone.rotation; + +} + +static function HorizontalAngle (direction : Vector3) { + return Mathf.Atan2 (direction.x, direction.z) * Mathf.Rad2Deg; +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/PlayerAnimation.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/PlayerAnimation.js.meta new file mode 100644 index 0000000..70588bd --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/PlayerAnimation.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 842b770b5d21e422c8cbcfed681ebf81 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/SpiderAnimation.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/SpiderAnimation.js new file mode 100644 index 0000000..9b6198f --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/SpiderAnimation.js @@ -0,0 +1,118 @@ +#pragma strict + +var motor : MovementMotor; +var activateAnim : AnimationClip; +var forwardAnim : AnimationClip; +var backAnim : AnimationClip; +var leftAnim : AnimationClip; +var rightAnim : AnimationClip; +var audioSource : AudioSource; +var footstepSignals : SignalSender; +var skiddingSounds : boolean; +var footstepSounds : boolean; + +private var tr : Transform; +private var lastFootstepTime : float = 0; +private var lastAnimTime : float = 0; + +function OnEnable () { + tr = motor.transform; + + GetComponent.()[activateAnim.name].enabled = true; + GetComponent.()[activateAnim.name].weight = 1; + GetComponent.()[activateAnim.name].time = 0; + GetComponent.()[activateAnim.name].speed = 1; + + GetComponent.()[forwardAnim.name].layer = 1; + GetComponent.()[forwardAnim.name].enabled = true; + GetComponent.()[forwardAnim.name].weight = 0; + GetComponent.()[backAnim.name].layer = 1; + GetComponent.()[backAnim.name].enabled = true; + GetComponent.()[backAnim.name].weight = 0; + GetComponent.()[leftAnim.name].layer = 1; + GetComponent.()[leftAnim.name].enabled = true; + GetComponent.()[leftAnim.name].weight = 0; + GetComponent.()[rightAnim.name].layer = 1; + GetComponent.()[rightAnim.name].enabled = true; + GetComponent.()[rightAnim.name].weight = 0; + +} + +function OnDisable () { + GetComponent.()[activateAnim.name].enabled = true; + GetComponent.()[activateAnim.name].weight = 1; + GetComponent.()[activateAnim.name].normalizedTime = 1; + GetComponent.()[activateAnim.name].speed = -1; + GetComponent.().CrossFade (activateAnim.name, 0.3, PlayMode.StopAll); +} + +function Update () { + var direction : Vector3 = motor.movementDirection; + direction.y = 0; + + var walkWeight : float = direction.magnitude; + + GetComponent.()[forwardAnim.name].speed = walkWeight; + GetComponent.()[rightAnim.name].speed = walkWeight; + GetComponent.()[backAnim.name].speed = walkWeight; + GetComponent.()[leftAnim.name].speed = walkWeight; + + var angle : float = Mathf.DeltaAngle ( + HorizontalAngle (tr.forward), + HorizontalAngle (direction) + ); + + if (walkWeight > 0.01) { + var w : float; + if (angle < -90) { + w = Mathf.InverseLerp (-180, -90, angle); + GetComponent.()[forwardAnim.name].weight = 0; + GetComponent.()[rightAnim.name].weight = 0; + GetComponent.()[backAnim.name].weight = 1 - w; + GetComponent.()[leftAnim.name].weight = 1; + } + else if (angle < 0) { + w = Mathf.InverseLerp (-90, 0, angle); + GetComponent.()[forwardAnim.name].weight = w; + GetComponent.()[rightAnim.name].weight = 0; + GetComponent.()[backAnim.name].weight = 0; + GetComponent.()[leftAnim.name].weight = 1 - w; + } + else if (angle < 90) { + w = Mathf.InverseLerp (0, 90, angle); + GetComponent.()[forwardAnim.name].weight = 1 - w; + GetComponent.()[rightAnim.name].weight = w; + GetComponent.()[backAnim.name].weight = 0; + GetComponent.()[leftAnim.name].weight = 0; + } + else { + w = Mathf.InverseLerp (90, 180, angle); + GetComponent.()[forwardAnim.name].weight = 0; + GetComponent.()[rightAnim.name].weight = 1 - w; + GetComponent.()[backAnim.name].weight = w; + GetComponent.()[leftAnim.name].weight = 0; + } + } + + if (skiddingSounds) { + if (walkWeight > 0.2 && !audioSource.isPlaying) + audioSource.Play (); + else if (walkWeight < 0.2 && audioSource.isPlaying) + audioSource.Pause (); + } + + if (footstepSounds && walkWeight > 0.2) { + var newAnimTime = Mathf.Repeat (GetComponent.()[forwardAnim.name].normalizedTime * 4 + 0.1, 1); + if (newAnimTime < lastAnimTime) { + if (Time.time > lastFootstepTime + 0.1) { + footstepSignals.SendSignals (this); + lastFootstepTime = Time.time; + } + } + lastAnimTime = newAnimTime; + } +} + +static function HorizontalAngle (direction : Vector3) { + return Mathf.Atan2 (direction.x, direction.z) * Mathf.Rad2Deg; +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/SpiderAnimation.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/SpiderAnimation.js.meta new file mode 100644 index 0000000..137ec02 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/SpiderAnimation.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b9b1abacf2a5046178faf10c090ffb35 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/SpiderAnimationTest.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/SpiderAnimationTest.js new file mode 100644 index 0000000..33e309f --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/SpiderAnimationTest.js @@ -0,0 +1,98 @@ +#pragma strict + +#if !UNITY_FLASH + +var rigid : Rigidbody; +var forwardAnim : AnimationClip; +var backAnim : AnimationClip; +var leftAnim : AnimationClip; +var rightAnim : AnimationClip; + +var walking : float; +var angle : float; + +private var tr : Transform; + +function OnEnable () { + tr = rigid.transform; + + GetComponent.()[forwardAnim.name].layer = 1; + GetComponent.()[forwardAnim.name].enabled = true; + GetComponent.()[backAnim.name].layer = 1; + GetComponent.()[backAnim.name].enabled = true; + GetComponent.()[leftAnim.name].layer = 1; + GetComponent.()[leftAnim.name].enabled = true; + GetComponent.()[rightAnim.name].layer = 1; + GetComponent.()[rightAnim.name].enabled = true; + GetComponent.().SyncLayer (1); +} + +function Update () { + rigid.velocity = Quaternion.Euler(0, angle, 0) * rigid.transform.forward * 2.4 * walking; + + var velocity : Vector3 = rigid.velocity; + velocity.y = 0; + + var walkWeight : float = velocity.magnitude / 2.4; + + GetComponent.()[forwardAnim.name].speed = walkWeight; + GetComponent.()[rightAnim.name].speed = walkWeight; + GetComponent.()[backAnim.name].speed = walkWeight; + GetComponent.()[leftAnim.name].speed = walkWeight; + + if (velocity == Vector3.zero) { + return; + } + + var angle : float = Mathf.DeltaAngle ( + HorizontalAngle (tr.forward), + HorizontalAngle (rigid.velocity) + ); + + var w : float; + if (angle < -90) { + w = Mathf.InverseLerp (-180, -90, angle); + GetComponent.()[forwardAnim.name].weight = 0; + GetComponent.()[rightAnim.name].weight = 0; + GetComponent.()[backAnim.name].weight = 1 - w; + GetComponent.()[leftAnim.name].weight = 1; + } + else if (angle < 0) { + w = Mathf.InverseLerp (-90, 0, angle); + GetComponent.()[forwardAnim.name].weight = w; + GetComponent.()[rightAnim.name].weight = 0; + GetComponent.()[backAnim.name].weight = 0; + GetComponent.()[leftAnim.name].weight = 1 - w; + } + else if (angle < 90) { + w = Mathf.InverseLerp (0, 90, angle); + GetComponent.()[forwardAnim.name].weight = 1 - w; + GetComponent.()[rightAnim.name].weight = w; + GetComponent.()[backAnim.name].weight = 0; + GetComponent.()[leftAnim.name].weight = 0; + } + else { + w = Mathf.InverseLerp (90, 180, angle); + GetComponent.()[forwardAnim.name].weight = 0; + GetComponent.()[rightAnim.name].weight = 1 - w; + GetComponent.()[backAnim.name].weight = w; + GetComponent.()[leftAnim.name].weight = 0; + } +} + +static function HorizontalAngle (direction : Vector3) { + return Mathf.Atan2 (direction.x, direction.z) * Mathf.Rad2Deg; +} + +function OnGUI () { + GUILayout.Label ("Angle (0 to 360): "+angle.ToString("0.00")); + angle = GUILayout.HorizontalSlider (angle, 0, 360, GUILayout.Width (200)); + for (var i : int = 0; i<=360; i+=45) { + if (Mathf.Abs (angle - i) < 10) + angle = i; + } + + GUILayout.Label ("Walking (0 to 1): "+walking.ToString("0.00")); + walking = GUILayout.HorizontalSlider (walking, 0, 1, GUILayout.Width (100)); +} +#endif \ No newline at end of file diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/SpiderAnimationTest.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/SpiderAnimationTest.js.meta new file mode 100644 index 0000000..7a2dc53 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/SpiderAnimationTest.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 27c365583b4af467a9b085c4b2c18f37 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/conveyorBelt.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/conveyorBelt.js new file mode 100644 index 0000000..6d3da02 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/conveyorBelt.js @@ -0,0 +1,24 @@ + +#pragma strict + +var scrollSpeed : float = 0.1; +var mat : Material; + +function Start () { + enabled = false; +} + +function OnBecameVisible () { + enabled = true; +} + +function OnBecameInvisible () { + enabled = false; +} + +function Update () { + var offset : float = (Time.time * scrollSpeed) % 1.0; + + mat.SetTextureOffset ("_MainTex", Vector2(0, -offset)); + mat.SetTextureOffset ("_BumpMap", Vector2(0, -offset)); +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/conveyorBelt.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/conveyorBelt.js.meta new file mode 100644 index 0000000..072a07f --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Animation/conveyorBelt.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4ad3c97b882594f91a676c3445e487db +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Fx.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Fx.meta new file mode 100644 index 0000000..79afbd9 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Fx.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 06ffe9b1fe24bd447acd9b5cb01e85bc +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Fx/GlowPlane.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Fx/GlowPlane.js new file mode 100644 index 0000000..cec44c2 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Fx/GlowPlane.js @@ -0,0 +1,54 @@ + +#pragma strict + +var playerTransform : Transform; +private var pos : Vector3; +private var scale : Vector3; +var minGlow : float = 0.2f; +var maxGlow : float = 0.5f; +var glowColor : Color = Color.white; + +private var mat : Material; + +function Start () { + if (!playerTransform) + playerTransform = GameObject.FindWithTag ("Player").transform; + pos = transform.position; + scale = transform.localScale; + mat = GetComponent.().material; + enabled = false; +} + +function OnDrawGizmos () { + Gizmos.color = glowColor; + Gizmos.color.a = maxGlow * 0.25f; + Gizmos.matrix = transform.localToWorldMatrix; + var scale : Vector3 = 5.0f * Vector3.Scale (Vector3.one, Vector3(1,0,1)); + Gizmos.DrawCube (Vector3.zero, scale); + Gizmos.matrix = Matrix4x4.identity; +} + +function OnDrawGizmosSelected () { + Gizmos.color = glowColor; + Gizmos.color.a = maxGlow; + Gizmos.matrix = transform.localToWorldMatrix; + var scale : Vector3 = 5.0f * Vector3.Scale (Vector3.one, Vector3(1,0,1)); + Gizmos.DrawCube (Vector3.zero, scale); + Gizmos.matrix = Matrix4x4.identity; +} + +function OnBecameVisible () { + enabled = true; +} + +function OnBecameInvisible () { + enabled = false; +} + +function Update () { + var vec : Vector3 = (pos - playerTransform.position); + vec.y = 0.0f; + var distance = vec.magnitude; + transform.localScale = Vector3.Lerp (Vector3.one * minGlow, scale, Mathf.Clamp01 (distance * 0.35f)); + mat.SetColor ("_TintColor", glowColor * Mathf.Clamp (distance * 0.1f, minGlow, maxGlow)); +} \ No newline at end of file diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Fx/GlowPlane.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Fx/GlowPlane.js.meta new file mode 100644 index 0000000..85960cf --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Fx/GlowPlane.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 38f2946e5dd7e4fcf8deb05e72f915dc +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Fx/GlowPlaneAngleFade.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Fx/GlowPlaneAngleFade.js new file mode 100644 index 0000000..c1e4000 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Fx/GlowPlaneAngleFade.js @@ -0,0 +1,19 @@ + +#pragma strict + +var cameraTransform : Transform; +var glowColor : Color = Color.grey; +private var dot : float = 0.5f; + +function Start () { + if (!cameraTransform) + cameraTransform = Camera.main.transform; +} + +function Update () { + dot = 1.5f * Mathf.Clamp01 (Vector3.Dot (cameraTransform.forward, -transform.up) - 0.25f); +} + +function OnWillRenderObject () { + GetComponent.().sharedMaterial.SetColor ("_TintColor", glowColor * dot); +} \ No newline at end of file diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Fx/GlowPlaneAngleFade.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Fx/GlowPlaneAngleFade.js.meta new file mode 100644 index 0000000..d2a30d3 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Fx/GlowPlaneAngleFade.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e840c8e0c4a924e53a9125f6a35cb26d +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Fx/LaserScope.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Fx/LaserScope.js new file mode 100644 index 0000000..9dd3206 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Fx/LaserScope.js @@ -0,0 +1,71 @@ +#pragma strict + +@script RequireComponent (PerFrameRaycast) + +public var scrollSpeed : float = 0.5; +public var pulseSpeed : float = 1.5; + +public var noiseSize : float = 1.0; + +public var maxWidth : float = 0.5; +public var minWidth : float = 0.2; + +public var pointer : GameObject = null; + +private var lRenderer : LineRenderer; +private var aniTime : float = 0.0; +private var aniDir : float = 1.0; + +private var raycast : PerFrameRaycast; + +function Start() { + lRenderer = gameObject.GetComponent (LineRenderer) as LineRenderer; + aniTime = 0.0; + + // Change some animation values here and there + ChoseNewAnimationTargetCoroutine(); + + raycast = GetComponent. (); +} + +function ChoseNewAnimationTargetCoroutine () { + while (true) { + aniDir = aniDir * 0.9 + Random.Range (0.5, 1.5) * 0.1; + yield; + minWidth = minWidth * 0.8 + Random.Range (0.1, 1.0) * 0.2; + yield WaitForSeconds (1.0 + Random.value * 2.0 - 1.0); + } +} + +function Update () { + GetComponent.().material.mainTextureOffset.x += Time.deltaTime * aniDir * scrollSpeed; + GetComponent.().material.SetTextureOffset ("_NoiseTex", Vector2 (-Time.time * aniDir * scrollSpeed, 0.0)); + + var aniFactor : float = Mathf.PingPong (Time.time * pulseSpeed, 1.0); + aniFactor = Mathf.Max (minWidth, aniFactor) * maxWidth; + lRenderer.SetWidth (aniFactor, aniFactor); + + // Cast a ray to find out the end point of the laser + var hitInfo : RaycastHit = raycast.GetHitInfo (); + if (hitInfo.transform) { + lRenderer.SetPosition (1, (hitInfo.distance * Vector3.forward)); + GetComponent.().material.mainTextureScale.x = 0.1 * (hitInfo.distance); + GetComponent.().material.SetTextureScale ("_NoiseTex", Vector2 (0.1 * hitInfo.distance * noiseSize, noiseSize)); + + // Use point and normal to align a nice & rough hit plane + if (pointer) { + pointer.GetComponent.().enabled = true; + pointer.transform.position = hitInfo.point + (transform.position - hitInfo.point) * 0.01; + pointer.transform.rotation = Quaternion.LookRotation (hitInfo.normal, transform.up); + pointer.transform.eulerAngles.x = 90.0; + } + } + else { + if (pointer) + pointer.GetComponent.().enabled = false; + var maxDist : float = 200.0; + lRenderer.SetPosition (1, (maxDist * Vector3.forward)); + GetComponent.().material.mainTextureScale.x = 0.1 * (maxDist); + GetComponent.().material.SetTextureScale ("_NoiseTex", Vector2 (0.1 * (maxDist) * noiseSize, noiseSize)); + } +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Fx/LaserScope.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Fx/LaserScope.js.meta new file mode 100644 index 0000000..76592fa --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Fx/LaserScope.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2aa4d88eb4eed41fd915afa70498e1a7 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Fx/SelfIlluminationBlink.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Fx/SelfIlluminationBlink.js new file mode 100644 index 0000000..8ef2889 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Fx/SelfIlluminationBlink.js @@ -0,0 +1,12 @@ + +#pragma strict + +public var blink : float = 0.0f; + +function OnWillRenderObject () { + GetComponent.().sharedMaterial.SetFloat ("_SelfIllumStrength", blink); +} + +function Blink () { + blink = 1.0f - blink; +} \ No newline at end of file diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Fx/SelfIlluminationBlink.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Fx/SelfIlluminationBlink.js.meta new file mode 100644 index 0000000..3bcc277 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Fx/SelfIlluminationBlink.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bc1f526f6b3cc4adf97bae3794998cea +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/GameScore.cs b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/GameScore.cs new file mode 100644 index 0000000..a552b45 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/GameScore.cs @@ -0,0 +1,123 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +public class GameScore : MonoBehaviour +{ + static GameScore s_Instance; + + + static GameScore Instance + { + get + { + if (s_Instance == null) + { + s_Instance = (GameScore)FindObjectOfType(typeof(GameScore)); + } + + return s_Instance; + } + } + + + public void OnApplicationQuit() + { + s_Instance = null; + } + + + public string playerLayerName = "Player", enemyLayerName = "Enemies"; + + + int m_Deaths; + readonly Dictionary m_Kills = new Dictionary(); + float m_StartTime; + + + public static int Deaths + { + get + { + if (Instance == null) + { + return 0; + } + + return Instance.m_Deaths; + } + } + + + #if !UNITY_FLASH + public static ICollection KillTypes + { + get + { + if (Instance == null) + { + return new string[0]; + } + + return Instance.m_Kills.Keys; + } + } + #endif // if !UNITY_FLASH + + + public static int GetKills(string type) + { + if (Instance == null || !Instance.m_Kills.ContainsKey(type)) + { + return 0; + } + + return Instance.m_Kills[type]; + } + + + public static float GameTime + { + get + { + if (Instance == null) + { + return 0.0f; + } + + return Time.time - Instance.m_StartTime; + } + } + + + public static void RegisterDeath(GameObject deadObject) + { + if (Instance == null) + { + Debug.Log("Game score not loaded"); + return; + } + + int + playerLayer = LayerMask.NameToLayer(Instance.playerLayerName), + enemyLayer = LayerMask.NameToLayer(Instance.enemyLayerName); + + if (deadObject.layer == playerLayer) + { + Instance.m_Deaths++; + } + else if (deadObject.layer == enemyLayer) + { + Instance.m_Kills[deadObject.name] = Instance.m_Kills.ContainsKey(deadObject.name) ? Instance.m_Kills[deadObject.name] + 1 : 1; + } + } + + + public void Awake() + { + if (m_StartTime == 0.0f) + { + m_StartTime = Time.time; + } + } +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/GameScore.cs.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/GameScore.cs.meta new file mode 100644 index 0000000..de80deb --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/GameScore.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b81a279071a454c63970e678a54bf52e +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Managers.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Managers.meta new file mode 100644 index 0000000..ff1bb67 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Managers.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: ee06c696d9fc367419b6b463c296fd3e +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Managers/Spawner.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Managers/Spawner.js new file mode 100644 index 0000000..b4f8d49 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Managers/Spawner.js @@ -0,0 +1,125 @@ +#pragma strict + +static var spawner : Spawner; + +var caches : ObjectCache[]; + +var activeCachedObjects : Hashtable; + + +class ObjectCache { + var prefab : GameObject; + var cacheSize : int = 10; + + private var objects : GameObject[]; + private var cacheIndex : int = 0; + + function Initialize () + { + objects = new GameObject[cacheSize]; + + // Instantiate the objects in the array and set them to be inactive + for (var i = 0; i < cacheSize; i++) + { + objects[i] = MonoBehaviour.Instantiate (prefab) as GameObject; + objects[i].SetActive (false); + objects[i].name = objects[i].name + i; + } + } + + function GetNextObjectInCache () : GameObject { + var obj : GameObject = null; + + // The cacheIndex starts out at the position of the object created + // the longest time ago, so that one is usually free, + // but in case not, loop through the cache until we find a free one. + for (var i : int = 0; i < cacheSize; i++) { + obj = objects[cacheIndex]; + + // If we found an inactive object in the cache, use that. + if (!obj.activeSelf) + break; + + // If not, increment index and make it loop around + // if it exceeds the size of the cache + cacheIndex = (cacheIndex + 1) % cacheSize; + } + + // The object should be inactive. If it's not, log a warning and use + // the object created the longest ago even though it's still active. + if (obj.activeSelf) { + Debug.LogWarning ( + "Spawn of " + prefab.name + + " exceeds cache size of " + cacheSize + + "! Reusing already active object.", obj); + Spawner.Destroy (obj); + } + + // Increment index and make it loop around + // if it exceeds the size of the cache + cacheIndex = (cacheIndex + 1) % cacheSize; + + return obj; + } +} + +function Awake () { + // Set the global variable + spawner = this; + + // Total number of cached objects + var amount : int = 0; + + // Loop through the caches + for (var i = 0; i < caches.length; i++) { + // Initialize each cache + caches[i].Initialize (); + + // Count + amount += caches[i].cacheSize; + } + + // Create a hashtable with the capacity set to the amount of cached objects specified + activeCachedObjects = new Hashtable (amount); +} + +static function Spawn (prefab : GameObject, position : Vector3, rotation : Quaternion) : GameObject { + var cache : ObjectCache = null; + + // Find the cache for the specified prefab + if (spawner) { + for (var i = 0; i < spawner.caches.length; i++) { + if (spawner.caches[i].prefab == prefab) { + cache = spawner.caches[i]; + } + } + } + + // If there's no cache for this prefab type, just instantiate normally + if (cache == null) { + return Instantiate (prefab, position, rotation) as GameObject; + } + + // Find the next object in the cache + var obj : GameObject = cache.GetNextObjectInCache (); + + // Set the position and rotation of the object + obj.transform.position = position; + obj.transform.rotation = rotation; + + // Set the object to be active + obj.SetActive (true); + spawner.activeCachedObjects[obj] = true; + + return obj; +} + +static function Destroy (objectToDestroy : GameObject) { + if (spawner && spawner.activeCachedObjects.ContainsKey (objectToDestroy)) { + objectToDestroy.SetActive (false); + spawner.activeCachedObjects[objectToDestroy] = false; + } + else { + objectToDestroy.Destroy (objectToDestroy); + } +} \ No newline at end of file diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Managers/Spawner.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Managers/Spawner.js.meta new file mode 100644 index 0000000..2aa19c5 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Managers/Spawner.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2ab0dadae0ad24c4c9ab8db71212a73f +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules.meta new file mode 100644 index 0000000..3b259d5 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: e964a38b856f751458d1f72a80a8566a +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/DestroyObject.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/DestroyObject.js new file mode 100644 index 0000000..92bfaf4 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/DestroyObject.js @@ -0,0 +1,7 @@ +#pragma strict + +var objectToDestroy : GameObject; + +function OnSignal () { + Spawner.Destroy (objectToDestroy); +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/DestroyObject.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/DestroyObject.js.meta new file mode 100644 index 0000000..acb94f2 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/DestroyObject.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 96d8cc5dd1ca645bfaf494fe8499ee65 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/PlaySound.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/PlaySound.js new file mode 100644 index 0000000..4bc5855 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/PlaySound.js @@ -0,0 +1,15 @@ +#pragma strict + +var audioSource : AudioSource; +var sound : AudioClip; + +function Awake () { + if (!audioSource && GetComponent.()) + audioSource = GetComponent.(); +} + +function OnSignal () { + if (sound) + audioSource.clip = sound; + audioSource.Play (); +} \ No newline at end of file diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/PlaySound.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/PlaySound.js.meta new file mode 100644 index 0000000..2393c59 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/PlaySound.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3bc8e13a6337a4127830231edb1c17c1 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/SignalSender.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/SignalSender.js new file mode 100644 index 0000000..831c0d0 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/SignalSender.js @@ -0,0 +1,32 @@ + +#pragma strict + +class ReceiverItem { + public var receiver : GameObject; + public var action : String = "OnSignal"; + public var delay : float; + + public function SendWithDelay (sender : MonoBehaviour) { + yield WaitForSeconds (delay); + if (receiver) + receiver.SendMessage (action); + else + Debug.LogWarning ("No receiver of signal \""+action+"\" on object "+sender.name+" ("+sender.GetType().Name+")", sender); + } +} + +class SignalSender { + public var onlyOnce : boolean; + public var receivers : ReceiverItem[]; + + private var hasFired : boolean = false; + + public function SendSignals (sender : MonoBehaviour) { + if (hasFired == false || onlyOnce == false) { + for (var i = 0; i < receivers.length; i++) { + sender.StartCoroutine (receivers[i].SendWithDelay(sender)); + } + hasFired = true; + } + } +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/SignalSender.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/SignalSender.js.meta new file mode 100644 index 0000000..4743151 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/SignalSender.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d1f11ce43d3424aaca3d76884c778c74 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/SpawnAtCheckpoint.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/SpawnAtCheckpoint.js new file mode 100644 index 0000000..2f46503 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/SpawnAtCheckpoint.js @@ -0,0 +1,19 @@ +#pragma strict +#pragma downcast + +var checkpoint : Transform; + +function OnSignal () { + transform.position = checkpoint.position; + transform.rotation = checkpoint.rotation; + + ResetHealthOnAll (); +} + +static function ResetHealthOnAll () { + var healthObjects : Health[] = FindObjectsOfType (Health); + for (var health : Health in healthObjects) { + health.dead = false; + health.health = health.maxHealth; + } +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/SpawnAtCheckpoint.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/SpawnAtCheckpoint.js.meta new file mode 100644 index 0000000..3dbc447 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/SpawnAtCheckpoint.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a56da7f4d8d704d38878df0a3dc25256 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/SpawnObject.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/SpawnObject.js new file mode 100644 index 0000000..a1a8be7 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/SpawnObject.js @@ -0,0 +1,27 @@ +#pragma strict + +var objectToSpawn : GameObject; +var onDestroyedSignals : SignalSender; + +private var spawned : GameObject; + +// Keep disabled from the beginning +enabled = false; + +// When we get a signal, spawn the objectToSpawn and store the spawned object. +// Also enable this behaviour so the Update function will be run. +function OnSignal () { + spawned = Spawner.Spawn (objectToSpawn, transform.position, transform.rotation); + if (onDestroyedSignals.receivers.Length > 0) + enabled = true; +} + +// After the object is spawned, check each frame if it's still there. +// Once it's not, activate the onDestroyedSignals and disable again. +function Update () { + if (spawned == null || spawned.activeInHierarchy == false) + { + onDestroyedSignals.SendSignals (this); + enabled = false; + } +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/SpawnObject.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/SpawnObject.js.meta new file mode 100644 index 0000000..0f5d333 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/SpawnObject.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0589e866f6e934e0ab0b2e8fd77f31f3 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/TriggerOnMouseOrJoystick.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/TriggerOnMouseOrJoystick.js new file mode 100644 index 0000000..78fff42 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/TriggerOnMouseOrJoystick.js @@ -0,0 +1,50 @@ +#pragma strict + +public var mouseDownSignals : SignalSender; +public var mouseUpSignals : SignalSender; + +private var state : boolean = false; + +#if UNITY_IPHONE || UNITY_ANDROID || UNITY_WP8 || UNITY_BLACKBERRY +private var joysticks : Joystick[]; + +function Start () { + joysticks = FindObjectsOfType (Joystick) as Joystick[]; +} +#endif + +function Update () { +#if UNITY_IPHONE || UNITY_ANDROID || UNITY_WP8 || UNITY_BLACKBERRY + if (state == false && joysticks[0].tapCount > 0) { + mouseDownSignals.SendSignals (this); + state = true; + } + else if (joysticks[0].tapCount <= 0) { + mouseUpSignals.SendSignals (this); + state = false; + } +#else + #if !UNITY_EDITOR && (UNITY_XBOX360 || UNITY_PS3) + // On consoles use the right trigger to fire + var fireAxis : float = Input.GetAxis("TriggerFire"); + if (state == false && fireAxis >= 0.2) { + mouseDownSignals.SendSignals (this); + state = true; + } + else if (state == true && fireAxis < 0.2) { + mouseUpSignals.SendSignals (this); + state = false; + } + #else + if (state == false && Input.GetMouseButtonDown (0)) { + mouseDownSignals.SendSignals (this); + state = true; + } + + else if (state == true && Input.GetMouseButtonUp (0)) { + mouseUpSignals.SendSignals (this); + state = false; + } + #endif +#endif +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/TriggerOnMouseOrJoystick.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/TriggerOnMouseOrJoystick.js.meta new file mode 100644 index 0000000..e835832 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Modules/TriggerOnMouseOrJoystick.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: da7fca1c8c5d14d4d92c3d7a92db64b5 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Movement.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Movement.meta new file mode 100644 index 0000000..10bac72 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Movement.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 4b9053fd574e4e94e8c44312c58f6792 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Movement/FreeMovementMotor.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Movement/FreeMovementMotor.js new file mode 100644 index 0000000..457a7d4 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Movement/FreeMovementMotor.js @@ -0,0 +1,48 @@ +#pragma strict + +@script RequireComponent (Rigidbody) + +class FreeMovementMotor extends MovementMotor { + + //public var movement : MoveController; + public var walkingSpeed : float = 5.0; + public var walkingSnappyness : float = 50; + public var turningSmoothing : float = 0.3; + + function FixedUpdate () { + // Handle the movement of the character + var targetVelocity : Vector3 = movementDirection * walkingSpeed; + var deltaVelocity : Vector3 = targetVelocity - GetComponent.().velocity; + if (GetComponent.().useGravity) + deltaVelocity.y = 0; + GetComponent.().AddForce (deltaVelocity * walkingSnappyness, ForceMode.Acceleration); + + // Setup player to face facingDirection, or if that is zero, then the movementDirection + var faceDir : Vector3 = facingDirection; + if (faceDir == Vector3.zero) + faceDir = movementDirection; + + // Make the character rotate towards the target rotation + if (faceDir == Vector3.zero) { + GetComponent.().angularVelocity = Vector3.zero; + } + else { + var rotationAngle : float = AngleAroundAxis (transform.forward, faceDir, Vector3.up); + GetComponent.().angularVelocity = (Vector3.up * rotationAngle * turningSmoothing); + } + } + + // The angle between dirA and dirB around axis + static function AngleAroundAxis (dirA : Vector3, dirB : Vector3, axis : Vector3) { + // Project A and B onto the plane orthogonal target axis + dirA = dirA - Vector3.Project (dirA, axis); + dirB = dirB - Vector3.Project (dirB, axis); + + // Find (positive) angle between A and B + var angle : float = Vector3.Angle (dirA, dirB); + + // Return angle multiplied with 1 or -1 + return angle * (Vector3.Dot (axis, Vector3.Cross (dirA, dirB)) < 0 ? -1 : 1); + } + +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Movement/FreeMovementMotor.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Movement/FreeMovementMotor.js.meta new file mode 100644 index 0000000..0dd0a8f --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Movement/FreeMovementMotor.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e9f487a699bc54a4d9118822a0acad3a +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Movement/Joystick.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Movement/Joystick.js new file mode 100644 index 0000000..7cb165a --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Movement/Joystick.js @@ -0,0 +1,220 @@ +#pragma strict + +@script RequireComponent (GUITexture) + +class Boundary { + var min : Vector2 = Vector2.zero; + var max : Vector2 = Vector2.zero; +} + +static private var joysticks : Joystick[]; // A static collection of all joysticks +static private var enumeratedJoysticks : boolean = false; +static private var tapTimeDelta : float = 0.3; // Time allowed between taps + +var touchPad : boolean; // Is this a TouchPad? +var touchZone : Rect; +var deadZone : float = 0; // Control when position is output +var normalize : boolean = false; // Normalize output after the dead-zone? +var position : Vector2; // [-1, 1] in x,y +var tapCount : int; // Current tap count + +private var lastFingerId = -1; // Finger last used for this joystick +private var tapTimeWindow : float; // How much time there is left for a tap to occur +private var fingerDownPos : Vector2; +private var fingerDownTime : float; +private var firstDeltaTime : float = 0.5; + +private var gui : GUITexture; // Joystick graphic +private var defaultRect : Rect; // Default position / extents of the joystick graphic +private var guiBoundary : Boundary = Boundary (); // Boundary for joystick graphic +private var guiTouchOffset : Vector2; // Offset to apply to touch input +private var guiCenter : Vector2; // Center of joystick + +#if !UNITY_IPHONE && !UNITY_ANDROID && !UNITY_WP8 && !UNITY_BLACKBERRY + +function Awake () { + gameObject.SetActive (false); +} + +#else + +function Start () { + // Cache this component at startup instead of looking up every frame + gui = GetComponent. (); + + // Store the default rect for the gui, so we can snap back to it + defaultRect = gui.pixelInset; + + defaultRect.x += transform.position.x * Screen.width;// + gui.pixelInset.x; // - Screen.width * 0.5; + defaultRect.y += transform.position.y * Screen.height;// - Screen.height * 0.5; + + transform.position.x = 0.0; + transform.position.y = 0.0; + + if (touchPad) { + // If a texture has been assigned, then use the rect ferom the gui as our touchZone + if (gui.texture) + touchZone = defaultRect; + } + else { + // This is an offset for touch input to match with the top left + // corner of the GUI + guiTouchOffset.x = defaultRect.width * 0.5; + guiTouchOffset.y = defaultRect.height * 0.5; + + // Cache the center of the GUI, since it doesn't change + guiCenter.x = defaultRect.x + guiTouchOffset.x; + guiCenter.y = defaultRect.y + guiTouchOffset.y; + + // Let's build the GUI boundary, so we can clamp joystick movement + guiBoundary.min.x = defaultRect.x - guiTouchOffset.x; + guiBoundary.max.x = defaultRect.x + guiTouchOffset.x; + guiBoundary.min.y = defaultRect.y - guiTouchOffset.y; + guiBoundary.max.y = defaultRect.y + guiTouchOffset.y; + } +} + +function Disable () { + gameObject.SetActive (false); + enumeratedJoysticks = false; +} + +function ResetJoystick () { + // Release the finger control and set the joystick back to the default position + gui.pixelInset = defaultRect; + lastFingerId = -1; + position = Vector2.zero; + fingerDownPos = Vector2.zero; + + if (touchPad) + gui.color.a = 0.025; +} + +function IsFingerDown () : boolean { + return (lastFingerId != -1); +} + +function LatchedFinger (fingerId : int) { + // If another joystick has latched this finger, then we must release it + if (lastFingerId == fingerId) + ResetJoystick (); +} + +function Update () { + if (!enumeratedJoysticks) { + // Collect all joysticks in the game, so we can relay finger latching messages + joysticks = FindObjectsOfType (Joystick) as Joystick[]; + enumeratedJoysticks = true; + } + + var count = Input.touchCount; + + // Adjust the tap time window while it still available + if (tapTimeWindow > 0) + tapTimeWindow -= Time.deltaTime; + else + tapCount = 0; + + if (count == 0) { + ResetJoystick (); + } + else { + for (var i : int = 0; i < count; i++) { + var touch : Touch = Input.GetTouch (i); + var guiTouchPos : Vector2 = touch.position - guiTouchOffset; + + var shouldLatchFinger = false; + if (touchPad) { + if (touchZone.Contains (touch.position)) + shouldLatchFinger = true; + } + else if (gui.HitTest (touch.position)) { + shouldLatchFinger = true; + } + + // Latch the finger if this is a new touch + if (shouldLatchFinger && (lastFingerId == -1 || lastFingerId != touch.fingerId)) { + + if (touchPad) { + gui.color.a = 0.15; + + lastFingerId = touch.fingerId; + fingerDownPos = touch.position; + fingerDownTime = Time.time; + } + + lastFingerId = touch.fingerId; + + // Accumulate taps if it is within the time window + if (tapTimeWindow > 0) { + tapCount++; + } + else { + tapCount = 1; + tapTimeWindow = tapTimeDelta; + } + + // Tell other joysticks we've latched this finger + for (var j : Joystick in joysticks) { + if (j != null && j != this) + j.LatchedFinger (touch.fingerId); + } + } + + if (lastFingerId == touch.fingerId) { + // Override the tap count with what the iPhone SDK reports if it is greater + // This is a workaround, since the iPhone SDK does not currently track taps + // for multiple touches + if (touch.tapCount > tapCount) + tapCount = touch.tapCount; + + if (touchPad) { + // For a touchpad, let's just set the position directly based on distance from initial touchdown + position.x = Mathf.Clamp ((touch.position.x - fingerDownPos.x) / (touchZone.width / 2), -1, 1); + position.y = Mathf.Clamp ((touch.position.y - fingerDownPos.y) / (touchZone.height / 2), -1, 1); + } + else { + // Change the location of the joystick graphic to match where the touch is + position.x = (touch.position.x - guiCenter.x) / guiTouchOffset.x; + position.y = (touch.position.y - guiCenter.y) / guiTouchOffset.y; + } + + if (touch.phase == TouchPhase.Ended || touch.phase == TouchPhase.Canceled) + ResetJoystick (); + } + } + } + + // Calculate the length. This involves a squareroot operation, + // so it's slightly expensive. We re-use this length for multiple + // things below to avoid doing the square-root more than one. + var length : float = position.magnitude; + + + if (length < deadZone) { + // If the length of the vector is smaller than the deadZone radius, + // set the position to the origin. + position = Vector2.zero; + } + else { + if (length > 1) { + // Normalize the vector if its length was greater than 1. + // Use the already calculated length instead of using Normalize(). + position = position / length; + } + else if (normalize) { + // Normalize the vector and multiply it with the length adjusted + // to compensate for the deadZone radius. + // This prevents the position from snapping from zero to the deadZone radius. + position = position / length * Mathf.InverseLerp (length, deadZone, 1); + } + } + + if (!touchPad) { + // Change the location of the joystick graphic to match the position + gui.pixelInset.x = (position.x - 1) * guiTouchOffset.x + guiCenter.x; + gui.pixelInset.y = (position.y - 1) * guiTouchOffset.y + guiCenter.y; + } +} + +#endif diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Movement/Joystick.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Movement/Joystick.js.meta new file mode 100644 index 0000000..01ec410 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Movement/Joystick.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6efbc9189a79f4c6a8fd15a49bb59229 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Movement/MovementMotor.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Movement/MovementMotor.js new file mode 100644 index 0000000..3c5e58f --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Movement/MovementMotor.js @@ -0,0 +1,20 @@ +#pragma strict + +/* +This class can be used like an interface. +Inherit from it to define your own movement motor that can control +the movement of characters, enemies, or other entities. +*/ + +// The direction the character wants to move in, in world space. +// The vector should have a length between 0 and 1. +@HideInInspector +public var movementDirection : Vector3; + +// Simpler motors might want to drive movement based on a target purely +@HideInInspector +public var movementTarget : Vector3; + +// The direction the character wants to face towards, in world space. +@HideInInspector +public var facingDirection : Vector3; diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Movement/MovementMotor.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Movement/MovementMotor.js.meta new file mode 100644 index 0000000..5b9705d --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Movement/MovementMotor.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7b8ae6d18282948edb7a0ae1a97e2bd4 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Movement/PlayerMoveController.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Movement/PlayerMoveController.js new file mode 100644 index 0000000..fbfafda --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Movement/PlayerMoveController.js @@ -0,0 +1,272 @@ +#pragma strict + +// Objects to drag in +public var motor : MovementMotor; +public var character : Transform; +public var cursorPrefab : GameObject; +public var joystickPrefab : GameObject; + +// Settings +public var cameraSmoothing : float = 0.01; +public var cameraPreview : float = 2.0f; + +// Cursor settings +public var cursorPlaneHeight : float = 0; +public var cursorFacingCamera : float = 0; +public var cursorSmallerWithDistance : float = 0; +public var cursorSmallerWhenClose : float = 1; + +// Private memeber data +private var mainCamera : Camera; + +private var cursorObject : Transform; +private var joystickLeft : Joystick; +private var joystickRight : Joystick; + +private var mainCameraTransform : Transform; +private var cameraVelocity : Vector3 = Vector3.zero; +private var cameraOffset : Vector3 = Vector3.zero; +private var initOffsetToPlayer : Vector3; + +// Prepare a cursor point varibale. This is the mouse position on PC and controlled by the thumbstick on mobiles. +private var cursorScreenPosition : Vector3; + +private var playerMovementPlane : Plane; + +private var joystickRightGO : GameObject; + +private var screenMovementSpace : Quaternion; +private var screenMovementForward : Vector3; +private var screenMovementRight : Vector3; + +function Awake () { + motor.movementDirection = Vector2.zero; + motor.facingDirection = Vector2.zero; + + // Set main camera + mainCamera = Camera.main; + mainCameraTransform = mainCamera.transform; + + // Ensure we have character set + // Default to using the transform this component is on + if (!character) + character = transform; + + initOffsetToPlayer = mainCameraTransform.position - character.position; + + #if UNITY_IPHONE || UNITY_ANDROID || UNITY_WP8 || UNITY_BLACKBERRY + if (joystickPrefab) { + // Create left joystick + var joystickLeftGO : GameObject = Instantiate (joystickPrefab) as GameObject; + joystickLeftGO.name = "Joystick Left"; + joystickLeft = joystickLeftGO.GetComponent. (); + + // Create right joystick + joystickRightGO = Instantiate (joystickPrefab) as GameObject; + joystickRightGO.name = "Joystick Right"; + joystickRight = joystickRightGO.GetComponent. (); + } + #elif !UNITY_FLASH + if (cursorPrefab) { + cursorObject = (Instantiate (cursorPrefab) as GameObject).transform; + } + #endif + + // Save camera offset so we can use it in the first frame + cameraOffset = mainCameraTransform.position - character.position; + + // Set the initial cursor position to the center of the screen + cursorScreenPosition = Vector3 (0.5 * Screen.width, 0.5 * Screen.height, 0); + + // caching movement plane + playerMovementPlane = new Plane (character.up, character.position + character.up * cursorPlaneHeight); +} + +function Start () { + #if UNITY_IPHONE || UNITY_ANDROID || UNITY_WP8 || UNITY_BLACKBERRY + // Move to right side of screen + var guiTex : GUITexture = joystickRightGO.GetComponent. (); + guiTex.pixelInset.x = Screen.width - guiTex.pixelInset.x - guiTex.pixelInset.width; + #endif + + // it's fine to calculate this on Start () as the camera is static in rotation + + screenMovementSpace = Quaternion.Euler (0, mainCameraTransform.eulerAngles.y, 0); + screenMovementForward = screenMovementSpace * Vector3.forward; + screenMovementRight = screenMovementSpace * Vector3.right; +} + +function OnDisable () { + if (joystickLeft) + joystickLeft.enabled = false; + + if (joystickRight) + joystickRight.enabled = false; +} + +function OnEnable () { + if (joystickLeft) + joystickLeft.enabled = true; + + if (joystickRight) + joystickRight.enabled = true; +} + +function Update () { + // HANDLE CHARACTER MOVEMENT DIRECTION + #if UNITY_IPHONE || UNITY_ANDROID || UNITY_WP8 || UNITY_BLACKBERRY + motor.movementDirection = joystickLeft.position.x * screenMovementRight + joystickLeft.position.y * screenMovementForward; + #else + motor.movementDirection = Input.GetAxis ("Horizontal") * screenMovementRight + Input.GetAxis ("Vertical") * screenMovementForward; + #endif + + // Make sure the direction vector doesn't exceed a length of 1 + // so the character can't move faster diagonally than horizontally or vertically + if (motor.movementDirection.sqrMagnitude > 1) + motor.movementDirection.Normalize(); + + + // HANDLE CHARACTER FACING DIRECTION AND SCREEN FOCUS POINT + + // First update the camera position to take into account how much the character moved since last frame + //mainCameraTransform.position = Vector3.Lerp (mainCameraTransform.position, character.position + cameraOffset, Time.deltaTime * 45.0f * deathSmoothoutMultiplier); + + // Set up the movement plane of the character, so screenpositions + // can be converted into world positions on this plane + //playerMovementPlane = new Plane (Vector3.up, character.position + character.up * cursorPlaneHeight); + + // optimization (instead of newing Plane): + + playerMovementPlane.normal = character.up; + playerMovementPlane.distance = -character.position.y + cursorPlaneHeight; + + // used to adjust the camera based on cursor or joystick position + + var cameraAdjustmentVector : Vector3 = Vector3.zero; + + #if UNITY_IPHONE || UNITY_ANDROID || UNITY_WP8 || UNITY_BLACKBERRY + + // On mobiles, use the thumb stick and convert it into screen movement space + motor.facingDirection = joystickRight.position.x * screenMovementRight + joystickRight.position.y * screenMovementForward; + + cameraAdjustmentVector = motor.facingDirection; + + #else + + #if !UNITY_EDITOR && (UNITY_XBOX360 || UNITY_PS3) + + // On consoles use the analog sticks + var axisX : float = Input.GetAxis("LookHorizontal"); + var axisY : float = Input.GetAxis("LookVertical"); + motor.facingDirection = axisX * screenMovementRight + axisY * screenMovementForward; + + cameraAdjustmentVector = motor.facingDirection; + + #else + + // On PC, the cursor point is the mouse position + var cursorScreenPosition : Vector3 = Input.mousePosition; + + // Find out where the mouse ray intersects with the movement plane of the player + var cursorWorldPosition : Vector3 = ScreenPointToWorldPointOnPlane (cursorScreenPosition, playerMovementPlane, mainCamera); + + var halfWidth : float = Screen.width / 2.0f; + var halfHeight : float = Screen.height / 2.0f; + var maxHalf : float = Mathf.Max (halfWidth, halfHeight); + + // Acquire the relative screen position + var posRel : Vector3 = cursorScreenPosition - Vector3 (halfWidth, halfHeight, cursorScreenPosition.z); + posRel.x /= maxHalf; + posRel.y /= maxHalf; + + cameraAdjustmentVector = posRel.x * screenMovementRight + posRel.y * screenMovementForward; + cameraAdjustmentVector.y = 0.0; + + // The facing direction is the direction from the character to the cursor world position + motor.facingDirection = (cursorWorldPosition - character.position); + motor.facingDirection.y = 0; + + // Draw the cursor nicely + HandleCursorAlignment (cursorWorldPosition); + + #endif + + #endif + + // HANDLE CAMERA POSITION + + // Set the target position of the camera to point at the focus point + var cameraTargetPosition : Vector3 = character.position + initOffsetToPlayer + cameraAdjustmentVector * cameraPreview; + + // Apply some smoothing to the camera movement + mainCameraTransform.position = Vector3.SmoothDamp (mainCameraTransform.position, cameraTargetPosition, cameraVelocity, cameraSmoothing); + + // Save camera offset so we can use it in the next frame + cameraOffset = mainCameraTransform.position - character.position; +} + +public static function PlaneRayIntersection (plane : Plane, ray : Ray) : Vector3 { + var dist : float; + plane.Raycast (ray, dist); + return ray.GetPoint (dist); +} + +public static function ScreenPointToWorldPointOnPlane (screenPoint : Vector3, plane : Plane, camera : Camera) : Vector3 { + // Set up a ray corresponding to the screen position + var ray : Ray = camera.ScreenPointToRay (screenPoint); + + // Find out where the ray intersects with the plane + return PlaneRayIntersection (plane, ray); +} + +function HandleCursorAlignment (cursorWorldPosition : Vector3) { + if (!cursorObject) + return; + + // HANDLE CURSOR POSITION + + // Set the position of the cursor object + cursorObject.position = cursorWorldPosition; + + #if !UNITY_FLASH + // Hide mouse cursor when within screen area, since we're showing game cursor instead + Cursor.visible = (Input.mousePosition.x < 0 || Input.mousePosition.x > Screen.width || Input.mousePosition.y < 0 || Input.mousePosition.y > Screen.height); + #endif + + + // HANDLE CURSOR ROTATION + + var cursorWorldRotation : Quaternion = cursorObject.rotation; + if (motor.facingDirection != Vector3.zero) + cursorWorldRotation = Quaternion.LookRotation (motor.facingDirection); + + // Calculate cursor billboard rotation + var cursorScreenspaceDirection : Vector3 = Input.mousePosition - mainCamera.WorldToScreenPoint (transform.position + character.up * cursorPlaneHeight); + cursorScreenspaceDirection.z = 0; + var cursorBillboardRotation : Quaternion = mainCameraTransform.rotation * Quaternion.LookRotation (cursorScreenspaceDirection, -Vector3.forward); + + // Set cursor rotation + cursorObject.rotation = Quaternion.Slerp (cursorWorldRotation, cursorBillboardRotation, cursorFacingCamera); + + + // HANDLE CURSOR SCALING + + // The cursor is placed in the world so it gets smaller with perspective. + // Scale it by the inverse of the distance to the camera plane to compensate for that. + var compensatedScale : float = 0.1 * Vector3.Dot (cursorWorldPosition - mainCameraTransform.position, mainCameraTransform.forward); + + // Make the cursor smaller when close to character + var cursorScaleMultiplier : float = Mathf.Lerp (0.7, 1.0, Mathf.InverseLerp (0.5, 4.0, motor.facingDirection.magnitude)); + + // Set the scale of the cursor + cursorObject.localScale = Vector3.one * Mathf.Lerp (compensatedScale, 1, cursorSmallerWithDistance) * cursorScaleMultiplier; + + // DEBUG - REMOVE LATER + if (Input.GetKey(KeyCode.O)) cursorFacingCamera += Time.deltaTime * 0.5; + if (Input.GetKey(KeyCode.P)) cursorFacingCamera -= Time.deltaTime * 0.5; + cursorFacingCamera = Mathf.Clamp01(cursorFacingCamera); + + if (Input.GetKey(KeyCode.K)) cursorSmallerWithDistance += Time.deltaTime * 0.5; + if (Input.GetKey(KeyCode.L)) cursorSmallerWithDistance -= Time.deltaTime * 0.5; + cursorSmallerWithDistance = Mathf.Clamp01(cursorSmallerWithDistance); +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Movement/PlayerMoveController.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Movement/PlayerMoveController.js.meta new file mode 100644 index 0000000..bc0ffc7 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Movement/PlayerMoveController.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9d7c6dec62f844170bba875bf76e1dc4 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons.meta new file mode 100644 index 0000000..ddfeda2 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 8b837384299528446bae732abe601e67 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons/AutoFire.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons/AutoFire.js new file mode 100644 index 0000000..585a8e6 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons/AutoFire.js @@ -0,0 +1,87 @@ +#pragma strict + +@script RequireComponent (PerFrameRaycast) + +var bulletPrefab : GameObject; +var spawnPoint : Transform; +var frequency : float = 10; +var coneAngle : float = 1.5; +var firing : boolean = false; +var damagePerSecond : float = 20.0; +var forcePerSecond : float = 20.0; +var hitSoundVolume : float = 0.5; + +var muzzleFlashFront : GameObject; + +private var lastFireTime : float = -1; +private var raycast : PerFrameRaycast; + +function Awake () { + muzzleFlashFront.SetActive (false); + + raycast = GetComponent. (); + if (spawnPoint == null) + spawnPoint = transform; +} + +function Update () { + if (firing) { + + if (Time.time > lastFireTime + 1 / frequency) { + // Spawn visual bullet + var coneRandomRotation = Quaternion.Euler (Random.Range (-coneAngle, coneAngle), Random.Range (-coneAngle, coneAngle), 0); + var go : GameObject = Spawner.Spawn (bulletPrefab, spawnPoint.position, spawnPoint.rotation * coneRandomRotation) as GameObject; + var bullet : SimpleBullet = go.GetComponent. (); + + lastFireTime = Time.time; + + // Find the object hit by the raycast + var hitInfo : RaycastHit = raycast.GetHitInfo (); + if (hitInfo.transform) { + // Get the health component of the target if any + var targetHealth : Health = hitInfo.transform.GetComponent. (); + if (targetHealth) { + // Apply damage + targetHealth.OnDamage (damagePerSecond / frequency, -spawnPoint.forward); + } + + // Get the rigidbody if any + if (hitInfo.rigidbody) { + // Apply force to the target object at the position of the hit point + var force : Vector3 = transform.forward * (forcePerSecond / frequency); + hitInfo.rigidbody.AddForceAtPosition (force, hitInfo.point, ForceMode.Impulse); + } + + // Ricochet sound + //var sound : AudioClip = MaterialImpactManager.GetBulletHitSound (hitInfo.collider.sharedMaterial); + //AudioSource.PlayClipAtPoint (sound, hitInfo.point, hitSoundVolume); + + bullet.dist = hitInfo.distance; + } + else { + bullet.dist = 1000; + } + } + } +} + +function OnStartFire () { + if (Time.timeScale == 0) + return; + + firing = true; + + muzzleFlashFront.SetActive (true); + + if (GetComponent.()) + GetComponent.().Play (); +} + +function OnStopFire () { + firing = false; + + muzzleFlashFront.SetActive (false); + + if (GetComponent.()) + GetComponent.().Stop (); +} \ No newline at end of file diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons/AutoFire.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons/AutoFire.js.meta new file mode 100644 index 0000000..6de2955 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons/AutoFire.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: edbe95fd377dc49c48b1705091597601 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons/Health.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons/Health.js new file mode 100644 index 0000000..227da3a --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons/Health.js @@ -0,0 +1,121 @@ +#pragma strict + +public var maxHealth : float = 100.0; +public var health : float = 100.0; +public var regenerateSpeed : float = 0.0; +public var invincible : boolean = false; +public var dead : boolean = false; + +public var damagePrefab : GameObject; +public var damageEffectTransform : Transform; +public var damageEffectMultiplier : float = 1.0; +public var damageEffectCentered : boolean = true; + +public var scorchMarkPrefab : GameObject = null; +private var scorchMark : GameObject = null; + +public var damageSignals : SignalSender; +public var dieSignals : SignalSender; + +private var lastDamageTime : float = 0; +private var damageEffectCenterYOffset : float; + +private var colliderRadiusHeuristic : float = 1.0; + + +function Awake () { + enabled = false; + if (damagePrefab) { + if (damageEffectTransform == null) + damageEffectTransform = transform; + var effect : GameObject = Spawner.Spawn (damagePrefab, Vector3.zero, Quaternion.identity); + effect.transform.parent = damageEffectTransform; + effect.transform.localPosition = Vector3.zero; + var tempSize : Vector2 = Vector2(GetComponent.().bounds.extents.x,GetComponent.().bounds.extents.z); + colliderRadiusHeuristic = tempSize.magnitude * 0.5; + damageEffectCenterYOffset = GetComponent.().bounds.extents.y; + + } + if (scorchMarkPrefab) { + scorchMark = GameObject.Instantiate(scorchMarkPrefab, Vector3.zero, Quaternion.identity); + scorchMark.SetActive (false); + } +} + +function OnDamage (amount : float, fromDirection : Vector3) { + // Take no damage if invincible, dead, or if the damage is zero + if(invincible) + return; + if (dead) + return; + if (amount <= 0) + return; + + // Decrease health by damage and send damage signals + + // @HACK: this hack will be removed for the final game + // but makes playing and showing certain areas in the + // game a lot easier + /* + #if !UNITY_IPHONE && !UNITY_ANDROID && !UNITY_WP8 + if(gameObject.tag != "Player") + amount *= 10.0; + #endif + */ + + health -= amount; + damageSignals.SendSignals (this); + lastDamageTime = Time.time; + + // Enable so the Update function will be called + // if regeneration is enabled + if (regenerateSpeed > 0) + enabled = true; + + // Die if no health left + if (health <= 0) + { +// GameScore.RegisterDeath (gameObject); + + health = 0; + dead = true; + dieSignals.SendSignals (this); + enabled = false; + + // scorch marks + if (scorchMark) { + scorchMark.SetActive (true); + // @NOTE: maybe we can justify a raycast here so we can place the mark + // on slopes with proper normal alignments + // @TODO: spawn a yield Sub() to handle placement, as we can + // spread calculations over several frames => cheap in total + var scorchPosition : Vector3 = GetComponent.().ClosestPointOnBounds (transform.position - Vector3.up * 100); + scorchMark.transform.position = scorchPosition + Vector3.up * 0.1; + scorchMark.transform.eulerAngles.y = Random.Range (0.0, 90.0); + } + } +} + +function OnEnable () { + Regenerate (); +} + +// Regenerate health + +function Regenerate () { + if (regenerateSpeed > 0.0f) { + while (enabled) { + if (Time.time > lastDamageTime + 3) { + health += regenerateSpeed; + + yield; + + if (health >= maxHealth) { + health = maxHealth; + enabled = false; + } + } + yield WaitForSeconds (1.0f); + } + } +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons/Health.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons/Health.js.meta new file mode 100644 index 0000000..0dcf65d --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons/Health.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6616aa5ec43b64f87969bac954839e71 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons/HealthFlash.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons/HealthFlash.js new file mode 100644 index 0000000..906e2ce --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons/HealthFlash.js @@ -0,0 +1,22 @@ + +#pragma strict + +public var playerHealth : Health; +public var healthMaterial : Material; + +private var healthBlink : float = 1.0f; +private var oneOverMaxHealth : float = 0.5f; + +function Start () { + oneOverMaxHealth = 1.0f / playerHealth.maxHealth; +} + +function Update () { + var relativeHealth : float = playerHealth.health * oneOverMaxHealth; + healthMaterial.SetFloat ("_SelfIllumination", relativeHealth * 2.0f * healthBlink); + + if (relativeHealth < 0.45f) + healthBlink = Mathf.PingPong (Time.time * 6.0f, 2.0f); + else + healthBlink = 1.0f; +} \ No newline at end of file diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons/HealthFlash.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons/HealthFlash.js.meta new file mode 100644 index 0000000..396339f --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons/HealthFlash.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 25a41887c1f614a99bbf5dd2c3ede1d5 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons/PerFrameRaycast.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons/PerFrameRaycast.js new file mode 100644 index 0000000..4d8f7b6 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons/PerFrameRaycast.js @@ -0,0 +1,18 @@ +#pragma strict + +private var hitInfo : RaycastHit; +private var tr : Transform; + +function Awake () { + tr = transform; +} + +function Update () { + // Cast a ray to find out the end point of the laser + hitInfo = RaycastHit (); + Physics.Raycast (tr.position, tr.forward, hitInfo); +} + +function GetHitInfo () : RaycastHit { + return hitInfo; +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons/PerFrameRaycast.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons/PerFrameRaycast.js.meta new file mode 100644 index 0000000..0ded867 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons/PerFrameRaycast.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 52152dd6c99c14e64a97087106b52477 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons/SimpleBullet.js b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons/SimpleBullet.js new file mode 100644 index 0000000..c8ea115 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons/SimpleBullet.js @@ -0,0 +1,21 @@ +#pragma strict + +var speed : float = 10; +var lifeTime : float = 0.5; +var dist : float = 10000; + +private var spawnTime : float = 0.0; +private var tr : Transform; + +function OnEnable () { + tr = transform; + spawnTime = Time.time; +} + +function Update () { + tr.position += tr.forward * speed * Time.deltaTime; + dist -= speed * Time.deltaTime; + if (Time.time > spawnTime + lifeTime || dist < 0) { + Spawner.Destroy (gameObject); + } +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons/SimpleBullet.js.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons/SimpleBullet.js.meta new file mode 100644 index 0000000..533e2d1 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Scripts/Weapons/SimpleBullet.js.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 42948b8c903d84cca9ae54d9f2a1a1d6 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders.meta new file mode 100644 index 0000000..681acd3 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: d426f4f55fb97a248ac216fcec9cc7bf +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters.meta new file mode 100644 index 0000000..8b2269e --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: b3a36b75a3f1da44ab762505be44e718 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/AngryInclude.cginc b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/AngryInclude.cginc new file mode 100644 index 0000000..175de0a --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/AngryInclude.cginc @@ -0,0 +1,24 @@ +// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld' + +// Upgrade NOTE: unity_Scale shader variable was removed; replaced 'unity_Scale.w' with '1.0' + + +#ifndef ANGRY_CG_INCLUDED +#define ANGRY_CG_INCLUDED + +#include "UnityCG.cginc" + +void WriteTangentSpaceData (appdata_full v, out half3 ts0, out half3 ts1, out half3 ts2) { + TANGENT_SPACE_ROTATION; + ts0 = mul(rotation, unity_ObjectToWorld[0].xyz * 1.0); + ts1 = mul(rotation, unity_ObjectToWorld[1].xyz * 1.0); + ts2 = mul(rotation, unity_ObjectToWorld[2].xyz * 1.0); +} + +half2 EthansFakeReflection (half4 vtx) { + half3 worldSpace = mul(unity_ObjectToWorld, vtx).xyz; + worldSpace = (-_WorldSpaceCameraPos * 0.6 + worldSpace) * 0.07; + return worldSpace.xz; +} + +#endif \ No newline at end of file diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/AngryInclude.cginc.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/AngryInclude.cginc.meta new file mode 100644 index 0000000..32044f5 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/AngryInclude.cginc.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 79a10448ba009433ebaf9d089fa9242f diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/CharacterSelfIlluminationReflective.shader b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/CharacterSelfIlluminationReflective.shader new file mode 100644 index 0000000..50346b3 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/CharacterSelfIlluminationReflective.shader @@ -0,0 +1,180 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +// Upgrade NOTE: commented out 'float4x4 _CameraToWorld', a built-in variable +// Upgrade NOTE: replaced '_CameraToWorld' with 'unity_CameraToWorld' +// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld' + + +/* + +the + +CharacterSelfIlluminationReflective + +performs optimized custom character lighting (self illumination enabled and + reflective (with a simple heuristic for the reflection mask)) + +*/ + +Shader "AngryBots/Character/CharacterSelfIlluminationReflective" { + + Properties { + _MainTex ("Base (RGB) Gloss (A)", 2D) = "grey" {} + _BumpMap ("Normalmap", 2D) = "bump" {} + _Cube ("Cube", CUBE) = "black" {} + _SelfIllumStrength ("_SelfIllumStrength", Range(0.0, 1.5)) = 1.0 + _RoomReflectionAmount ("RoomReflectionAmount", Range(0.0, 3.5)) = 3.0 + } + + CGINCLUDE + + #include "UnityCG.cginc" + #include "AngryInclude.cginc" + + // uniform float4x4 _CameraToWorld; + uniform half4 _MainTex_ST; + uniform sampler2D _MainTex; + uniform sampler2D _BumpMap; + uniform samplerCUBE _Cube; + + uniform fixed _RoomReflectionAmount; + uniform fixed _SelfIllumStrength; + + half3 VertexLightsWorldSpace (half3 WP, half3 WN) + { + half3 lightColor = half3(0.0,0.0,0.0); + + // preface & optimization + half3 toLight0 = mul(unity_CameraToWorld, unity_LightPosition[0] * half4(1,1,-1,1)).xyz - WP; + half3 toLight1 = mul(unity_CameraToWorld, unity_LightPosition[1] * half4(1,1,-1,1)).xyz - WP; + half2 lengthSq2 = half2(dot(toLight0, toLight0), dot(toLight1, toLight1)); + + half2 atten2 = half2(1.0,1.0) + lengthSq2 * half2(unity_LightAtten[0].z, unity_LightAtten[1].z); + atten2 = 1.0 / atten2; + + // light #0 + half diff = saturate (dot (WN, normalize(toLight0))); + lightColor += unity_LightColor[0].rgb * (diff * atten2.x); + + // light #1 + diff = saturate (dot (WN, normalize(toLight1))); + lightColor += unity_LightColor[1].rgb * (diff * atten2.y); + + return lightColor * 1.75 + 0.2; + } + + ENDCG + + SubShader { + LOD 300 + Lighting on + Tags { "RenderType"="Opaque" "Reflection" = "RenderReflectionOpaque" "Queue"="Geometry" } + + Pass { + + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + #pragma fragmentoption ARB_precision_hint_fastest + + struct v2f_full + { + half4 pos : POSITION; + half3 color : TEXCOORD0; + half2 uv : TEXCOORD1; + half3 viewDir : TEXCOORD2; + half3 tsBase0 : TEXCOORD3; + half3 tsBase1 : TEXCOORD4; + half3 tsBase2 : TEXCOORD5; + }; + + v2f_full vert (appdata_full v) + { + v2f_full o; + + o.pos = UnityObjectToClipPos(v.vertex); + + half3 worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; + half3 worldNormal = mul((half3x3)unity_ObjectToWorld, v.normal.xyz); + + o.color = VertexLightsWorldSpace(worldPos, worldNormal); + + o.uv.xy = TRANSFORM_TEX(v.texcoord, _MainTex); + o.viewDir = (_WorldSpaceCameraPos.xyz - worldPos); + + WriteTangentSpaceData(v, o.tsBase0,o.tsBase1,o.tsBase2); + + return o; + } + + fixed4 frag (v2f_full i) : COLOR + { + fixed4 tex = tex2D(_MainTex, i.uv.xy); + half3 nrml = UnpackNormal(tex2D(_BumpMap, i.uv.xy)); + half3 bumpedNormal = half3(dot(i.tsBase0,nrml), dot(i.tsBase1,nrml), dot(i.tsBase2,nrml)); + + half3 reflDir = reflect(i.viewDir, bumpedNormal); + fixed4 refl = texCUBE (_Cube, reflDir); + half4 outColor = tex; + outColor.rgb *= i.color + tex.a * _SelfIllumStrength; + outColor += refl * _RoomReflectionAmount * saturate(tex.b - 0.225); + return outColor; + } + + ENDCG + } + } + + SubShader { + LOD 190 + Lighting on + Tags { "RenderType"="Opaque" "Reflection" = "RenderReflectionOpaque" "Queue"="Geometry" } + + Pass { + + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + #pragma fragmentoption ARB_precision_hint_fastest + + struct v2f + { + half4 pos : POSITION; + half3 color : TEXCOORD0; + half2 uv : TEXCOORD1; + half3 reflDir : TEXCOORD2; + }; + + v2f vert (appdata_base v) + { + v2f o; + o.pos = UnityObjectToClipPos(v.vertex); + + half3 worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; + half3 worldNormal = mul((half3x3)unity_ObjectToWorld, v.normal.xyz); + + o.color = VertexLightsWorldSpace(worldPos, worldNormal); + + o.uv.xy = TRANSFORM_TEX(v.texcoord,_MainTex); + o.reflDir = (_WorldSpaceCameraPos.xyz - worldPos); + o.reflDir = reflect (o.reflDir, worldNormal); + + return o; + } + + fixed4 frag (v2f i) : COLOR + { + fixed4 tex = tex2D(_MainTex, i.uv.xy); + fixed4 refl = texCUBE (_Cube, i.reflDir); + half4 outColor = tex; + outColor.rgb *= i.color + tex.a * _SelfIllumStrength; + outColor += refl * _RoomReflectionAmount * saturate(tex.b - 0.225); + return outColor; + } + + ENDCG + } + } +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/CharacterSelfIlluminationReflective.shader.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/CharacterSelfIlluminationReflective.shader.meta new file mode 100644 index 0000000..237060f --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/CharacterSelfIlluminationReflective.shader.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 8de45c360a2d542f4be2d61da2beba10 +ShaderImporter: + defaultTextures: [] + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/EnemySelfIlluminationReflective.shader b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/EnemySelfIlluminationReflective.shader new file mode 100644 index 0000000..5228a3a --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/EnemySelfIlluminationReflective.shader @@ -0,0 +1,169 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +// Upgrade NOTE: commented out 'float4x4 _CameraToWorld', a built-in variable +// Upgrade NOTE: replaced '_CameraToWorld' with 'unity_CameraToWorld' +// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld' + + +/* + +the + +EnemySelfIlluminationReflective + +is a cheaper and less accurate version of the +CharacterSelfIlluminationReflective shader but pretty +much the same on highest quality setting + +*/ + +Shader "AngryBots/Character/EnemySelfIlluminationReflective" { + + Properties { + _MainTex ("Base (RGB) Gloss (A)", 2D) = "grey" {} + _BumpMap ("Normalmap", 2D) = "bump" {} + _Cube ("Cube", CUBE) = "black" {} + _SelfIllumStrength ("_SelfIllumStrength", Range(0.0, 1.5)) = 1.0 + } + + CGINCLUDE + + #include "UnityCG.cginc" + #include "AngryInclude.cginc" + + uniform half4 _MainTex_ST; + uniform sampler2D _MainTex; + uniform samplerCUBE _Cube; + uniform fixed _SelfIllumStrength; + uniform sampler2D _BumpMap; + // uniform float4x4 _CameraToWorld; + + half3 VertexLightsWorldSpace (half3 WP, half3 WN) + { + half3 lightColor = half3(0.0,0.0,0.0); + + // preface & optimization + half3 toLight0 = mul(unity_CameraToWorld, unity_LightPosition[0] * half4(1,1,-1,1)).xyz - WP; + half3 toLight1 = mul(unity_CameraToWorld, unity_LightPosition[1] * half4(1,1,-1,1)).xyz - WP; + half2 lengthSq2 = half2(dot(toLight0, toLight0), dot(toLight1, toLight1)); + + half2 atten2 = half2(1.0,1.0) + lengthSq2 * half2(unity_LightAtten[0].z, unity_LightAtten[1].z); + atten2 = 1.0 / atten2; + + // light #0 + half diff = saturate (dot (WN, normalize(toLight0))); + lightColor += unity_LightColor[0].rgb * (diff * atten2.x); + + // light #1 + diff = saturate (dot (WN, normalize(toLight1))); + lightColor += unity_LightColor[1].rgb * (diff * atten2.y); + + return lightColor * 1.75 + 0.2; + } + + ENDCG + + SubShader { + LOD 300 + Lighting on + Tags { "RenderType"="Opaque" "Reflection" = "RenderReflectionOpaque" "Queue"="Geometry" } + + Pass { + + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + #pragma fragmentoption ARB_precision_hint_fastest + + struct v2f_full + { + half4 pos : POSITION; + half3 color : TEXCOORD0; + half2 uv : TEXCOORD1; + half3 viewDir : TEXCOORD2; + half3 tsBase0 : TEXCOORD3; + half3 tsBase1 : TEXCOORD4; + half3 tsBase2 : TEXCOORD5; + }; + + v2f_full vert (appdata_full v) + { + v2f_full o; + + o.pos = UnityObjectToClipPos(v.vertex); + + half3 worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; + half3 worldNormal = mul((half3x3)unity_ObjectToWorld, v.normal.xyz); + + o.color = VertexLightsWorldSpace(worldPos, worldNormal); + + o.uv.xy = TRANSFORM_TEX(v.texcoord, _MainTex); + o.viewDir = (_WorldSpaceCameraPos.xyz - worldPos); + + WriteTangentSpaceData(v, o.tsBase0,o.tsBase1,o.tsBase2); + + return o; + } + + fixed4 frag (v2f_full i) : COLOR + { + fixed4 tex = tex2D(_MainTex, i.uv.xy); + half3 nrml = UnpackNormal(tex2D(_BumpMap, i.uv.xy)); + half3 bumpedNormal = half3(dot(i.tsBase0,nrml), dot(i.tsBase1,nrml), dot(i.tsBase2,nrml)); + half3 reflDir = reflect(i.viewDir, bumpedNormal); + fixed4 refl = texCUBE (_Cube, reflDir); + fixed4 outColor = half4((i.color + tex.a * _SelfIllumStrength) * tex, 1.0); + outColor += refl * 3.0 * saturate(tex.g - 0.25) * (1.0 - tex.a); + return outColor; + } + + ENDCG + } + } + + SubShader { + LOD 190 + Lighting on + Tags { "RenderType"="Opaque" "Reflection" = "RenderReflectionOpaque" "Queue"="Geometry" } + + Pass { + + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + #pragma fragmentoption ARB_precision_hint_fastest + + struct v2f + { + half4 pos : POSITION; + half4 color : TEXCOORD0; + half2 uv : TEXCOORD1; + half3 reflDir : TEXCOORD2; + }; + + v2f vert (appdata_base v) + { + v2f o; + o.color = (unity_LightColor[0] + unity_LightColor[1]) * 0.2; // heuristic for the lighting, works 'ok' in AngryBots, but is not a general solution + o.pos = UnityObjectToClipPos(v.vertex); + o.uv.xy = TRANSFORM_TEX(v.texcoord, _MainTex); + o.reflDir = WorldSpaceViewDir (v.vertex); + o.reflDir = reflect (o.reflDir, mul((half3x3)unity_ObjectToWorld, v.normal.xyz)); + return o; + } + + fixed4 frag (v2f i) : COLOR + { + fixed4 tex = tex2D(_MainTex, i.uv.xy); + fixed4 refl = texCUBE (_Cube, i.reflDir); + fixed4 outColor = (i.color + tex.a * _SelfIllumStrength) * tex; + outColor += refl * 3.0 * saturate(tex.g - 0.25) * (1.0 - tex.a); + return outColor; + } + + ENDCG + } + } +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/EnemySelfIlluminationReflective.shader.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/EnemySelfIlluminationReflective.shader.meta new file mode 100644 index 0000000..def8e3d --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/EnemySelfIlluminationReflective.shader.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: b6adcc18389e141f68abe08051c54567 +ShaderImporter: + defaultTextures: [] + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/Fallback.shader b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/Fallback.shader new file mode 100644 index 0000000..e49a45b --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/Fallback.shader @@ -0,0 +1,74 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +// Upgrade NOTE: commented out 'half4 unity_LightmapST', a built-in variable +// Upgrade NOTE: commented out 'sampler2D unity_Lightmap', a built-in variable +// Upgrade NOTE: replaced tex2D unity_Lightmap with UNITY_SAMPLE_TEX2D + + + +Shader "AngryBots/Fallback" { + +Properties { + _MainTex ("Base", 2D) = "white" {} +} + + +CGINCLUDE + +struct v2f +{ + half4 pos : SV_POSITION; + half2 uv : TEXCOORD0; + half2 uv2 : TEXCOORD1; +}; + +#include "AngryInclude.cginc" + +sampler2D _MainTex; + +ENDCG + +SubShader { + Tags { "RenderType"="Opaque" } + LOD 140 + + Pass { + CGPROGRAM + + // half4 unity_LightmapST; + // sampler2D unity_Lightmap; + half4 _MainTex_ST; + + v2f vert (appdata_full v) + { + v2f o; + o.pos = UnityObjectToClipPos (v.vertex); + o.uv = TRANSFORM_TEX(v.texcoord, _MainTex); + o.uv2 = v.texcoord1 * unity_LightmapST.xy + unity_LightmapST.zw; + return o; + } + + fixed4 frag (v2f i) : COLOR0 + { + fixed4 tex = tex2D (_MainTex, i.uv); + #ifdef LIGHTMAP_ON + fixed3 lm = DecodeLightmap (UNITY_SAMPLE_TEX2D(unity_Lightmap, i.uv2)); + tex.rgb *= lm; + #else + tex.rgb *= 0.65; + #endif + return tex; + } + + #pragma vertex vert + #pragma fragment frag + #pragma fragmentoption ARB_precision_hint_fastest + #pragma multi_compile LIGHTMAP_OFF LIGHTMAP_ON + + ENDCG + } +} + +FallBack Off +} + diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/Fallback.shader.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/Fallback.shader.meta new file mode 100644 index 0000000..a3d3180 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/Fallback.shader.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 29ddf4444ca8645d681e4ca451421c8d +ShaderImporter: + defaultTextures: [] + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/PlanarRealtimeReflection.shader b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/PlanarRealtimeReflection.shader new file mode 100644 index 0000000..913c640 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/PlanarRealtimeReflection.shader @@ -0,0 +1,163 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +// Upgrade NOTE: commented out 'half4 unity_LightmapST', a built-in variable +// Upgrade NOTE: commented out 'sampler2D unity_Lightmap', a built-in variable +// Upgrade NOTE: replaced tex2D unity_Lightmap with UNITY_SAMPLE_TEX2D + + +/* + +(realtime & planar) reflection shader. + +handles simple planar (y is up) bump displacement of planar reflections. + +*/ + +Shader "AngryBots/PlanarRealtimeReflection" { + Properties { + _MainTex ("Base", 2D) = "white" {} + _ReflectionTex ("Internal reflection", 2D) = "black" {} + _CubeReflTex ("Cube", CUBE) = "black" {} + _Normals ("Normal", 2D) = "bump" {} + } + + CGINCLUDE + + #include "UnityCG.cginc" + + sampler2D _MainTex; + sampler2D _ReflectionTex; + sampler2D _Normals; + samplerCUBE _CubeReflTex; + + struct v2f { + half4 pos : SV_POSITION; + half2 uv : TEXCOORD0; + half4 scr : TEXCOORD1; + half2 uvLM : TEXCOORD2; + }; + + struct v2f_full { + half4 pos : SV_POSITION; + half2 uv : TEXCOORD0; + half4 scr : TEXCOORD1; + half3 tsBase0 : TEXCOORD2; + half3 tsBase1 : TEXCOORD3; + half3 tsBase2 : TEXCOORD4; + half3 viewDir : TEXCOORD5; + half2 uvLM : TEXCOORD6; + }; + + ENDCG + + SubShader { + LOD 400 + + Tags { "RenderType"="Opaque" } + Fog { Mode Off } + + Pass { + + CGPROGRAM + + #include "AngryInclude.cginc" + + uniform half4 _MainTex_ST; + // half4 unity_LightmapST; + // sampler2D unity_Lightmap; + + v2f_full vert(appdata_full v) + { + v2f_full o; + + o.pos = UnityObjectToClipPos (v.vertex); + + o.uv.xy = TRANSFORM_TEX(v.texcoord.xy, _MainTex); + + o.scr = ComputeScreenPos(o.pos); + + o.uvLM = v.texcoord1.xy * unity_LightmapST.xy + unity_LightmapST.zw; + + WriteTangentSpaceData(v, o.tsBase0,o.tsBase1,o.tsBase2); + o.viewDir = normalize(WorldSpaceViewDir(v.vertex)); + + return o; + } + + half4 frag( v2f_full i ) : COLOR + { + half3 normals = UnpackNormal(tex2D(_Normals, i.uv.xy)); + half3 bumpedNormal = half3(dot(i.tsBase0,normals), dot(i.tsBase1,normals), dot(i.tsBase2,normals)); + + half3 reflectVector = reflect(-i.viewDir.xyz, bumpedNormal.xyz); + + half4 color = tex2D(_MainTex, i.uv); + i.scr = i.scr/i.scr.w; + + fixed3 lm = DecodeLightmap (UNITY_SAMPLE_TEX2D(unity_Lightmap, i.uvLM.xy)); + color.rgb *= lm; + + i.scr.xy += normals.xy; + return color + tex2D(_ReflectionTex, i.scr.xy) + texCUBE(_CubeReflTex, reflectVector) * 0.1; + } + + #pragma vertex vert + #pragma fragment frag + #pragma fragmentoption ARB_precision_hint_fastest + + ENDCG + + } + } + + SubShader { + LOD 200 + + Tags { "RenderType"="Opaque" } + Fog { Mode Off } + + Pass { + + CGPROGRAM + + uniform half4 _MainTex_ST; + // half4 unity_LightmapST; + // sampler2D unity_Lightmap; + + v2f vert(appdata_full v) + { + v2f o; + + o.pos = UnityObjectToClipPos (v.vertex); + + o.uv = TRANSFORM_TEX(v.texcoord, _MainTex); + o.uvLM = v.texcoord1.xy * unity_LightmapST.xy + unity_LightmapST.zw; + + o.scr = ComputeScreenPos(o.pos); + + return o; + } + + fixed4 frag( v2f i ) : COLOR + { + fixed4 color = tex2D(_MainTex, i.uv); + + fixed3 lm = DecodeLightmap(UNITY_SAMPLE_TEX2D(unity_Lightmap, i.uvLM)); + color.rgb *= lm; + + half2 screen = (i.scr.xy / i.scr.w); + + return color + tex2D(_ReflectionTex, screen) * color.a; + } + + #pragma vertex vert + #pragma fragment frag + #pragma fragmentoption ARB_precision_hint_fastest + + ENDCG + + } + } + + FallBack "AngryBots/Fallback" +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/PlanarRealtimeReflection.shader.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/PlanarRealtimeReflection.shader.meta new file mode 100644 index 0000000..63744a5 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/PlanarRealtimeReflection.shader.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 91083837e9bad4a5f8211c02db74526e +ShaderImporter: + defaultTextures: [] + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/ReflectiveBackgroundPlanar.shader b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/ReflectiveBackgroundPlanar.shader new file mode 100644 index 0000000..9fd839f --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/ReflectiveBackgroundPlanar.shader @@ -0,0 +1,162 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +// Upgrade NOTE: commented out 'half4 unity_LightmapST', a built-in variable +// Upgrade NOTE: commented out 'sampler2D unity_Lightmap', a built-in variable +// Upgrade NOTE: replaced tex2D unity_Lightmap with UNITY_SAMPLE_TEX2D + + +/* + +one of the most common shader in AngryBots, requires lightmap + +handles simple CUBE map reflections (higher end) or +fake planar (y is up) reflections (low end) + +*/ + +Shader "AngryBots/ReflectiveBackgroundPlanarGeometry" { + +Properties { + _MainTex ("Base", 2D) = "white" {} + _Cube ("Cube", Cube) = "" {} + _2DReflect ("2D Reflection", 2D) = "" {} + _Normal("Normal", 2D) = "bump" {} + _EmissionLM ("Emission (Lightmapper)", Float) = 0 +} + +CGINCLUDE + +// interpolator structs + +struct v2f +{ + half4 pos : SV_POSITION; + half2 uv : TEXCOORD0; + half2 uv2 : TEXCOORD1; + half2 uvLM : TEXCOORD2; +}; + +struct v2f_full +{ + half4 pos : SV_POSITION; + half2 uv : TEXCOORD0; + half3 worldViewDir : TEXCOORD1; + half3 tsBase0 : TEXCOORD2; + half3 tsBase1 : TEXCOORD3; + half3 tsBase2 : TEXCOORD4; + half2 uvLM : TEXCOORD5; +}; + +#include "AngryInclude.cginc" + +sampler2D _MainTex; +samplerCUBE _Cube; +sampler2D _2DReflect; +sampler2D _Normal; + +ENDCG + + +SubShader { + Tags { "RenderType"="Opaque" } + LOD 300 + + Pass { + CGPROGRAM + + half4 _MainTex_ST; + // half4 unity_LightmapST; + // sampler2D unity_Lightmap; + + v2f_full vert (appdata_full v) + { + v2f_full o; + o.pos = UnityObjectToClipPos (v.vertex); + o.uv = TRANSFORM_TEX(v.texcoord,_MainTex); + + o.uvLM = v.texcoord1.xy * unity_LightmapST.xy + unity_LightmapST.zw; + + o.worldViewDir = normalize(WorldSpaceViewDir(v.vertex)); + + WriteTangentSpaceData(v, o.tsBase0, o.tsBase1, o.tsBase2); + + return o; + } + + + fixed4 frag (v2f_full i) : COLOR0 + { + half3 nrml = UnpackNormal(tex2D(_Normal, i.uv.xy)); + half3 bumpedNormal = half3(dot(i.tsBase0,nrml), dot(i.tsBase1,nrml), dot(i.tsBase2,nrml)); + + half3 reflectVector = reflect(normalize(-i.worldViewDir.xyz), normalize(bumpedNormal.xyz)); + + half4 refl = texCUBE(_Cube, (reflectVector)); + + fixed4 tex = tex2D (_MainTex, i.uv.xy); + + tex += refl * tex.a; + + fixed3 lm = DecodeLightmap (UNITY_SAMPLE_TEX2D(unity_Lightmap, i.uvLM.xy)); + tex.rgb *= lm; + + return tex; + + } + + #pragma vertex vert + #pragma fragment frag + #pragma fragmentoption ARB_precision_hint_fastest + + ENDCG + } +} + +SubShader { + Tags { "RenderType"="Opaque" } + LOD 200 + + Pass { + CGPROGRAM + + half4 _MainTex_ST; + // half4 unity_LightmapST; + // sampler2D unity_Lightmap; + + v2f vert (appdata_full v) + { + v2f o; + o.pos = UnityObjectToClipPos (v.vertex); + o.uv = TRANSFORM_TEX (v.texcoord, _MainTex); + o.uvLM = v.texcoord1.xy * unity_LightmapST.xy + unity_LightmapST.zw; + o.uv2 = EthansFakeReflection (v.vertex); + + return o; + } + + fixed4 frag (v2f i) : COLOR0 + { + fixed4 tex = tex2D (_MainTex, i.uv); + + fixed4 refl = tex2D (_2DReflect, i.uv2); + tex += refl * tex.a; + + #ifdef LIGHTMAP_ON + fixed3 lm = DecodeLightmap (UNITY_SAMPLE_TEX2D (unity_Lightmap, i.uvLM)); + tex.rgb *= lm; + #endif + + return tex; + } + + #pragma vertex vert + #pragma fragment frag + #pragma fragmentoption ARB_precision_hint_fastest + #pragma multi_compile LIGHTMAP_OFF LIGHTMAP_ON + + ENDCG + } +} + +FallBack "AngryBots/Fallback" +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/ReflectiveBackgroundPlanar.shader.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/ReflectiveBackgroundPlanar.shader.meta new file mode 100644 index 0000000..f8bf3ac --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/ReflectiveBackgroundPlanar.shader.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: d3fe6e8745b794a77bfeb9a10c0fdddb +ShaderImporter: + defaultTextures: [] + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/SuperSimpleSelfIllumination.shader b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/SuperSimpleSelfIllumination.shader new file mode 100644 index 0000000..ef3e1cb --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/SuperSimpleSelfIllumination.shader @@ -0,0 +1,57 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +/* + +illum shader. + +self illumination based on base texture alpha channel. + +*/ + +Shader "AngryBots/SimpleSelfIllumination" { + +Properties { + _MainTex ("Base", 2D) = "grey" {} + _SelfIllumination ("Self Illumination", Range(0.0,2.0)) = 1.0 +} + +SubShader { + Pass { + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + + #include "UnityCG.cginc" + + uniform half4 _MainTex_ST; + uniform sampler2D _MainTex; + uniform fixed _SelfIllumination; + + struct v2f + { + half4 pos : POSITION; + half2 uv : TEXCOORD0; + }; + + v2f vert (appdata_base v) + { + v2f o; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv.xy = TRANSFORM_TEX(v.texcoord,_MainTex); + + return o; + } + + half4 frag (v2f i) : COLOR + { + fixed4 tex = tex2D(_MainTex, i.uv.xy); + return tex * tex.a * _SelfIllumination; + } + + ENDCG + } +} + +FallBack Off +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/SuperSimpleSelfIllumination.shader.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/SuperSimpleSelfIllumination.shader.meta new file mode 100644 index 0000000..5f9b2a1 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/BackgroundAndCharacters/SuperSimpleSelfIllumination.shader.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: df67c9bbb62a547f89e7224c115f0f12 +ShaderImporter: + defaultTextures: [] + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx.meta new file mode 100644 index 0000000..fa064b1 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: b07d5f1bc66f2cd45a52c218d59381a8 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/Additive.shader b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/Additive.shader new file mode 100644 index 0000000..5672ae8 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/Additive.shader @@ -0,0 +1,61 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + + +Shader "AngryBots/FX/Additive" { + Properties { + _MainTex ("Base", 2D) = "white" {} + _TintColor ("TintColor", Color) = (1.0, 1.0, 1.0, 1.0) + } + + CGINCLUDE + + #include "UnityCG.cginc" + + sampler2D _MainTex; + fixed4 _TintColor; + + half4 _MainTex_ST; + + struct v2f { + half4 pos : SV_POSITION; + half2 uv : TEXCOORD0; + }; + + v2f vert(appdata_full v) { + v2f o; + + o.pos = UnityObjectToClipPos (v.vertex); + o.uv.xy = TRANSFORM_TEX(v.texcoord, _MainTex); + + return o; + } + + fixed4 frag( v2f i ) : COLOR { + return tex2D (_MainTex, i.uv.xy) * _TintColor; + } + + ENDCG + + SubShader { + Tags { "RenderType" = "Transparent" "Reflection" = "RenderReflectionTransparentAdd" "Queue" = "Transparent"} + Cull Off + Lighting Off + ZWrite Off + Fog { Mode Off } + Blend One One + + Pass { + + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + #pragma fragmentoption ARB_precision_hint_fastest + + ENDCG + + } + + } + FallBack Off +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/Additive.shader.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/Additive.shader.meta new file mode 100644 index 0000000..f405153 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/Additive.shader.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: bbf40922523a2483584b1c4e6b1132ea +ShaderImporter: + defaultTextures: [] + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/Cursor.shader b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/Cursor.shader new file mode 100644 index 0000000..236164a --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/Cursor.shader @@ -0,0 +1,60 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + + +Shader "AngryBots/FX/Cursor" { + Properties { + _MainTex ("Base", 2D) = "white" {} + } + + CGINCLUDE + + #include "UnityCG.cginc" + + sampler2D _MainTex; + + half4 _MainTex_ST; + + struct v2f { + half4 pos : SV_POSITION; + half2 uv : TEXCOORD0; + }; + + v2f vert(appdata_full v) { + v2f o; + + o.pos = UnityObjectToClipPos (v.vertex); + o.uv.xy = TRANSFORM_TEX(v.texcoord, _MainTex); + + return o; + } + + fixed4 frag( v2f i ) : COLOR { + return tex2D (_MainTex, i.uv.xy); + } + + ENDCG + + SubShader { + Tags { "RenderType" = "Transparent" "Queue" = "Transparent+100"} + Cull Off + Lighting Off + ZWrite Off + ZTest Always + Fog { Mode Off } + Blend SrcAlpha OneMinusSrcAlpha + + Pass { + + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + #pragma fragmentoption ARB_precision_hint_fastest + + ENDCG + + } + + } + FallBack Off +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/Cursor.shader.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/Cursor.shader.meta new file mode 100644 index 0000000..52da017 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/Cursor.shader.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: fd219401e0edb4c1aafda4903ecdcb8e +ShaderImporter: + defaultTextures: [] + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/LaserScope.shader b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/LaserScope.shader new file mode 100644 index 0000000..d43c629 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/LaserScope.shader @@ -0,0 +1,65 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + + +Shader "AngryBots/FX/LaserScope" { + Properties { + _MainTex ("MainTex", 2D) = "white" + _NoiseTex ("NoiseTex", 2D) = "white" + } + + CGINCLUDE + + #include "UnityCG.cginc" + + sampler2D _MainTex; + sampler2D _NoiseTex; + + half4 _MainTex_ST; + half4 _NoiseTex_ST; + + fixed4 _TintColor; + + struct v2f { + half4 pos : SV_POSITION; + half4 uv : TEXCOORD0; + }; + + v2f vert(appdata_full v) + { + v2f o; + + o.pos = UnityObjectToClipPos (v.vertex); + o.uv.xy = TRANSFORM_TEX(v.texcoord, _MainTex); + o.uv.zw = TRANSFORM_TEX(v.texcoord, _NoiseTex); + + return o; + } + + fixed4 frag( v2f i ) : COLOR + { + return tex2D (_MainTex, i.uv.xy) * tex2D (_NoiseTex, i.uv.zw); + } + + ENDCG + + SubShader { + Tags { "RenderType" = "Transparent" "Reflection" = "LaserScope" "Queue" = "Transparent"} + Cull Off + ZWrite Off + Blend SrcAlpha One + + Pass { + + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + #pragma fragmentoption ARB_precision_hint_fastest + + ENDCG + + } + + } + FallBack Off +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/LaserScope.shader.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/LaserScope.shader.meta new file mode 100644 index 0000000..beff205 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/LaserScope.shader.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: f97e84bb5d33542f18a19a75fc878eb5 +ShaderImporter: + defaultTextures: [] + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/Multiply.shader b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/Multiply.shader new file mode 100644 index 0000000..4762290 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/Multiply.shader @@ -0,0 +1,57 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + + +Shader "AngryBots/FX/Multiply" { + Properties { + _MainTex ("Base", 2D) = "white" {} + } + + CGINCLUDE + + #include "UnityCG.cginc" + + sampler2D _MainTex; + + struct v2f { + half4 pos : SV_POSITION; + half2 uv : TEXCOORD0; + }; + + v2f vert(appdata_full v) { + v2f o; + + o.pos = UnityObjectToClipPos (v.vertex); + o.uv.xy = v.texcoord.xy; + + return o; + } + + fixed4 frag( v2f i ) : COLOR { + return tex2D (_MainTex, i.uv.xy); + } + + ENDCG + + SubShader { + Tags { "RenderType" = "Transparent" "Queue" = "Transparent" } + Cull Off + Lighting Off + ZWrite Off + Fog { Mode Off } + Blend Zero SrcColor + + Pass { + + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + #pragma fragmentoption ARB_precision_hint_fastest + + ENDCG + + } + + } + FallBack Off +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/Multiply.shader.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/Multiply.shader.meta new file mode 100644 index 0000000..a3433b9 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/Multiply.shader.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 9f64a9d4ccf54440db2d1452fb040528 +ShaderImporter: + defaultTextures: [] + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/ParticleAdditive.shader b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/ParticleAdditive.shader new file mode 100644 index 0000000..ebe17b8 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/ParticleAdditive.shader @@ -0,0 +1,62 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + + +Shader "AngryBots/Particle/Additive" { + Properties { + _MainTex ("Base", 2D) = "white" {} + _TintColor ("TintColor", Color) = (1.0, 1.0, 1.0, 1.0) + } + + CGINCLUDE + + #include "UnityCG.cginc" + + sampler2D _MainTex; + fixed4 _TintColor; + half4 _MainTex_ST; + + struct v2f { + half4 pos : SV_POSITION; + half2 uv : TEXCOORD0; + fixed4 vertexColor : COLOR; + }; + + v2f vert(appdata_full v) { + v2f o; + + o.pos = UnityObjectToClipPos (v.vertex); + o.uv = TRANSFORM_TEX(v.texcoord, _MainTex); + o.vertexColor = v.color * _TintColor; + + return o; + } + + fixed4 frag( v2f i ) : COLOR { + return tex2D (_MainTex, i.uv.xy) * i.vertexColor; + } + + ENDCG + + SubShader { + Tags { "RenderType" = "Transparent" "Queue" = "Transparent"} + Cull Off + Lighting Off + ZWrite Off + Fog { Mode Off } + Blend One One + + Pass { + + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + #pragma fragmentoption ARB_precision_hint_fastest + + ENDCG + + } + + } + FallBack Off +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/ParticleAdditive.shader.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/ParticleAdditive.shader.meta new file mode 100644 index 0000000..118713e --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/ParticleAdditive.shader.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: e364bec85c316420092937bb9d21855e +ShaderImporter: + defaultTextures: [] + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/ParticleAdditiveBlend.shader b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/ParticleAdditiveBlend.shader new file mode 100644 index 0000000..b3ae430 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/ParticleAdditiveBlend.shader @@ -0,0 +1,62 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + + +Shader "AngryBots/Particle/AdditiveBlend" { + Properties { + _MainTex ("Base", 2D) = "white" {} + _TintColor ("TintColor", Color) = (1.0, 1.0, 1.0, 1.0) + } + + CGINCLUDE + + #include "UnityCG.cginc" + + sampler2D _MainTex; + fixed4 _TintColor; + half4 _MainTex_ST; + + struct v2f { + half4 pos : SV_POSITION; + half2 uv : TEXCOORD0; + fixed4 vertexColor : COLOR; + }; + + v2f vert(appdata_full v) { + v2f o; + + o.pos = UnityObjectToClipPos (v.vertex); + o.uv = TRANSFORM_TEX(v.texcoord, _MainTex); + o.vertexColor = v.color * _TintColor; + + return o; + } + + fixed4 frag( v2f i ) : COLOR { + return tex2D (_MainTex, i.uv.xy) * i.vertexColor; + } + + ENDCG + + SubShader { + Tags { "RenderType" = "Transparent" "Queue" = "Transparent"} + Cull Off + Lighting Off + ZWrite Off + Fog { Mode Off } + Blend SrcAlpha One + + Pass { + + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + #pragma fragmentoption ARB_precision_hint_fastest + + ENDCG + + } + + } + FallBack Off +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/ParticleAdditiveBlend.shader.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/ParticleAdditiveBlend.shader.meta new file mode 100644 index 0000000..495319f --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/ParticleAdditiveBlend.shader.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: c2135471d096b4d9eb2c6cad707c7e9f +ShaderImporter: + defaultTextures: [] + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/ParticleBlend.shader b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/ParticleBlend.shader new file mode 100644 index 0000000..b2a23b3 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/ParticleBlend.shader @@ -0,0 +1,61 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + + +Shader "AngryBots/Particle/AlphaBlend" { + Properties { + _MainTex ("Base", 2D) = "white" {} + _TintColor ("TintColor", Color) = (1.0, 1.0, 1.0, 1.0) + } + + CGINCLUDE + + #include "UnityCG.cginc" + + sampler2D _MainTex; + fixed4 _TintColor; + + struct v2f { + half4 pos : SV_POSITION; + half2 uv : TEXCOORD0; + fixed4 vertexColor : COLOR; + }; + + v2f vert(appdata_full v) { + v2f o; + + o.pos = UnityObjectToClipPos (v.vertex); + o.uv.xy = v.texcoord.xy; + o.vertexColor = v.color * _TintColor; + + return o; + } + + fixed4 frag( v2f i ) : COLOR { + return tex2D (_MainTex, i.uv.xy) * i.vertexColor; + } + + ENDCG + + SubShader { + Tags { "RenderType" = "Transparent" "Queue" = "Transparent"} + Cull Off + Lighting Off + ZWrite Off + Fog { Mode Off } + Blend SrcAlpha OneMinusSrcAlpha + + Pass { + + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + #pragma fragmentoption ARB_precision_hint_fastest + + ENDCG + + } + + } + FallBack Off +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/ParticleBlend.shader.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/ParticleBlend.shader.meta new file mode 100644 index 0000000..519995d --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Shaders/Fx/ParticleBlend.shader.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: ed6efa9ef80ec48cba573a745bcfb023 +ShaderImporter: + defaultTextures: [] + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds.meta new file mode 100644 index 0000000..43c2493 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 692c47a0c60b19346afc4e6121a2ed35 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy.meta new file mode 100644 index 0000000..3d5938a --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 9af8612e9c3ce8645887fb0d363d45dc +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy/enemy_Spider_AlertSound.wav b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy/enemy_Spider_AlertSound.wav new file mode 100644 index 0000000..1861157 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy/enemy_Spider_AlertSound.wav differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy/enemy_Spider_AlertSound.wav.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy/enemy_Spider_AlertSound.wav.meta new file mode 100644 index 0000000..f3ea215 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy/enemy_Spider_AlertSound.wav.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2e8d592978491b44dbc307eaa276a47c +AudioImporter: + serializedVersion: 4 + format: 0 + quality: -1 + stream: 1 + 3D: 1 + forceToMono: 0 + useHardware: 0 + loopable: 0 + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy/enemy_Spider_DestroyedExplosion.wav b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy/enemy_Spider_DestroyedExplosion.wav new file mode 100644 index 0000000..e9420c9 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy/enemy_Spider_DestroyedExplosion.wav differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy/enemy_Spider_DestroyedExplosion.wav.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy/enemy_Spider_DestroyedExplosion.wav.meta new file mode 100644 index 0000000..487be4e --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy/enemy_Spider_DestroyedExplosion.wav.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e9c49907ada66bb48976b9f5b8080943 +AudioImporter: + serializedVersion: 4 + format: 0 + quality: -1 + stream: 1 + 3D: 1 + forceToMono: 0 + useHardware: 0 + loopable: 0 + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy/enemy_Spider_Proximity.wav b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy/enemy_Spider_Proximity.wav new file mode 100644 index 0000000..ab67ce8 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy/enemy_Spider_Proximity.wav differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy/enemy_Spider_Proximity.wav.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy/enemy_Spider_Proximity.wav.meta new file mode 100644 index 0000000..540b52b --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy/enemy_Spider_Proximity.wav.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 276dcbe5660b78e4cb1253cd4ad8d999 +AudioImporter: + serializedVersion: 4 + format: 0 + quality: -1 + stream: 1 + 3D: 1 + forceToMono: 0 + useHardware: 0 + loopable: 0 + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy/enemy_Spider_SelfDestruct.wav b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy/enemy_Spider_SelfDestruct.wav new file mode 100644 index 0000000..aaec6f4 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy/enemy_Spider_SelfDestruct.wav differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy/enemy_Spider_SelfDestruct.wav.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy/enemy_Spider_SelfDestruct.wav.meta new file mode 100644 index 0000000..a10b022 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy/enemy_Spider_SelfDestruct.wav.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5b62d96894fd3834da4bae15eeade12e +AudioImporter: + serializedVersion: 4 + format: 0 + quality: -1 + stream: 0 + 3D: 1 + forceToMono: 0 + useHardware: 0 + loopable: 0 + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy/enemy_Spider_skidding.wav b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy/enemy_Spider_skidding.wav new file mode 100644 index 0000000..9b796c9 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy/enemy_Spider_skidding.wav differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy/enemy_Spider_skidding.wav.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy/enemy_Spider_skidding.wav.meta new file mode 100644 index 0000000..e9cc1ec --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Enemy/enemy_Spider_skidding.wav.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 7eda02acc7af1ff41a60d180366b6d8f +AudioImporter: + serializedVersion: 4 + format: 0 + quality: -1 + stream: 1 + 3D: 1 + forceToMono: 0 + useHardware: 0 + loopable: 0 + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Player.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Player.meta new file mode 100644 index 0000000..d0d9065 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Player.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: d9d009e7913ac5048bf2c1e1cef07a37 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Player/player_hit.wav b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Player/player_hit.wav new file mode 100644 index 0000000..34680e9 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Player/player_hit.wav differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Player/player_hit.wav.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Player/player_hit.wav.meta new file mode 100644 index 0000000..0e9d2f8 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Player/player_hit.wav.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8eb80fa98d85ce34fae7affcdfb64c6c +AudioImporter: + serializedVersion: 4 + format: 0 + quality: -1 + stream: 1 + 3D: 1 + forceToMono: 0 + useHardware: 0 + loopable: 0 + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Player/player_killed_1.wav b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Player/player_killed_1.wav new file mode 100644 index 0000000..2827dc4 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Player/player_killed_1.wav differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Player/player_killed_1.wav.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Player/player_killed_1.wav.meta new file mode 100644 index 0000000..cd4af0f --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Player/player_killed_1.wav.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f0c98d0d5c7ecd54391e3bd2fa4f9be2 +AudioImporter: + serializedVersion: 4 + format: 0 + quality: -1 + stream: 1 + 3D: 1 + forceToMono: 0 + useHardware: 0 + loopable: 0 + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Player/player_shooting.wav b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Player/player_shooting.wav new file mode 100644 index 0000000..7b7e326 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Player/player_shooting.wav differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Player/player_shooting.wav.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Player/player_shooting.wav.meta new file mode 100644 index 0000000..341d566 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Sounds/Player/player_shooting.wav.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c7b8685e162577f41b72736b13f8be7a +AudioImporter: + serializedVersion: 4 + format: 0 + quality: -1 + stream: 1 + 3D: 1 + forceToMono: 0 + useHardware: 0 + loopable: 0 + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures.meta new file mode 100644 index 0000000..29ca9e8 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: f9d01290883590240a1cd15dc0c1d956 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects.meta new file mode 100644 index 0000000..89665bf --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 1aa7f26097c5c8a4ab7b61afe0ccee09 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/HealthBar.tif b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/HealthBar.tif new file mode 100644 index 0000000..6ad7d03 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/HealthBar.tif differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/HealthBar.tif.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/HealthBar.tif.meta new file mode 100644 index 0000000..2dbaf33 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/HealthBar.tif.meta @@ -0,0 +1,44 @@ +fileFormatVersion: 2 +guid: a7a58464376c2cb4c8be8ae606afff46 +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/LaserDot.psd b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/LaserDot.psd new file mode 100644 index 0000000..a8aa841 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/LaserDot.psd differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/LaserDot.psd.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/LaserDot.psd.meta new file mode 100644 index 0000000..ccbc85b --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/LaserDot.psd.meta @@ -0,0 +1,60 @@ +fileFormatVersion: 2 +guid: 965609fd66e81484aafb4fc0e102d1cc +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 32 + textureSettings: + filterMode: 1 + aniso: 3 + mipBias: -1 + wrapMode: 1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: 0 + buildTargetSettings: + - buildTarget: Web + maxTextureSize: 32 + textureFormat: -3 + compressionQuality: 50 + - buildTarget: Standalone + maxTextureSize: 32 + textureFormat: -3 + compressionQuality: 50 + - buildTarget: iPhone + maxTextureSize: 32 + textureFormat: -3 + compressionQuality: 50 + - buildTarget: Android + maxTextureSize: 32 + textureFormat: -3 + compressionQuality: 50 + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/LaserTexture.psd b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/LaserTexture.psd new file mode 100644 index 0000000..44ddb08 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/LaserTexture.psd differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/LaserTexture.psd.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/LaserTexture.psd.meta new file mode 100644 index 0000000..89491da --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/LaserTexture.psd.meta @@ -0,0 +1,60 @@ +fileFormatVersion: 2 +guid: df534e0918b424979a6037b4aa5a207b +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: 0 + buildTargetSettings: + - buildTarget: Web + maxTextureSize: 64 + textureFormat: -1 + compressionQuality: 50 + - buildTarget: Standalone + maxTextureSize: 64 + textureFormat: -1 + compressionQuality: 50 + - buildTarget: iPhone + maxTextureSize: 64 + textureFormat: -1 + compressionQuality: 50 + - buildTarget: Android + maxTextureSize: 64 + textureFormat: -1 + compressionQuality: 50 + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/Materials.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/Materials.meta new file mode 100644 index 0000000..f533556 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/Materials.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: d8242da0607094646a24312bb13de4a0 +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/Materials/SimpleNoise.mat b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/Materials/SimpleNoise.mat new file mode 100644 index 0000000..863a723 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/Materials/SimpleNoise.mat differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/Materials/SimpleNoise.mat.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/Materials/SimpleNoise.mat.meta new file mode 100644 index 0000000..e670d3c --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/Materials/SimpleNoise.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: cf6374f8000857c458d4902e2cfa34b3 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/Reflections.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/Reflections.meta new file mode 100644 index 0000000..63ae08a --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/Reflections.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 059f9630194553b4bb2eff3efd0a8510 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/Reflections/CubeMaps.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/Reflections/CubeMaps.meta new file mode 100644 index 0000000..d445c6a --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/Reflections/CubeMaps.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: bc899741848f50147894d6159d698885 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/Reflections/CubeMaps/LobbyRoom.cubemap b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/Reflections/CubeMaps/LobbyRoom.cubemap new file mode 100644 index 0000000..6e0aaf2 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/Reflections/CubeMaps/LobbyRoom.cubemap differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/Reflections/CubeMaps/LobbyRoom.cubemap.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/Reflections/CubeMaps/LobbyRoom.cubemap.meta new file mode 100644 index 0000000..e592d68 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/Reflections/CubeMaps/LobbyRoom.cubemap.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: b66d7d28b3db14f7382a2887575a3439 +NativeFormatImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/SimpleNoise.psd b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/SimpleNoise.psd new file mode 100644 index 0000000..d4c244e Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/SimpleNoise.psd differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/SimpleNoise.psd.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/SimpleNoise.psd.meta new file mode 100644 index 0000000..93d6da5 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Effects/SimpleNoise.psd.meta @@ -0,0 +1,60 @@ +fileFormatVersion: 2 +guid: d1bd32e2f0342418a81f73b582e0b4a2 +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -2 + maxTextureSize: 32 + textureSettings: + filterMode: 1 + aniso: 1 + mipBias: -1 + wrapMode: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: 0 + buildTargetSettings: + - buildTarget: Web + maxTextureSize: 32 + textureFormat: -2 + compressionQuality: 50 + - buildTarget: Standalone + maxTextureSize: 32 + textureFormat: -2 + compressionQuality: 50 + - buildTarget: iPhone + maxTextureSize: 32 + textureFormat: -2 + compressionQuality: 50 + - buildTarget: Android + maxTextureSize: 32 + textureFormat: -2 + compressionQuality: 50 + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Minebot.tif b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Minebot.tif new file mode 100644 index 0000000..f18ca8f Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Minebot.tif differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Minebot.tif.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Minebot.tif.meta new file mode 100644 index 0000000..5967764 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Minebot.tif.meta @@ -0,0 +1,64 @@ +fileFormatVersion: 2 +guid: d7ab2029fbe34d0499a26f57de1f51d6 +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 512 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: 0 + buildTargetSettings: + - buildTarget: Web + maxTextureSize: 512 + textureFormat: -1 + compressionQuality: -1 + - buildTarget: Standalone + maxTextureSize: 512 + textureFormat: -1 + compressionQuality: -1 + - buildTarget: iPhone + maxTextureSize: 256 + textureFormat: -1 + compressionQuality: -1 + - buildTarget: Android + maxTextureSize: 256 + textureFormat: -1 + compressionQuality: -1 + - buildTarget: FlashPlayer + maxTextureSize: 512 + textureFormat: -1 + compressionQuality: 20 + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Player.tif b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Player.tif new file mode 100644 index 0000000..e3f0135 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Player.tif differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Player.tif.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Player.tif.meta new file mode 100644 index 0000000..23157f1 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Player.tif.meta @@ -0,0 +1,64 @@ +fileFormatVersion: 2 +guid: 15e8834927ec3e445a626ae399fd97db +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: 0 + buildTargetSettings: + - buildTarget: Web + maxTextureSize: 1024 + textureFormat: -1 + compressionQuality: -1 + - buildTarget: Standalone + maxTextureSize: 1024 + textureFormat: -1 + compressionQuality: -1 + - buildTarget: iPhone + maxTextureSize: 256 + textureFormat: -1 + compressionQuality: -1 + - buildTarget: Android + maxTextureSize: 256 + textureFormat: -1 + compressionQuality: -1 + - buildTarget: FlashPlayer + maxTextureSize: 1024 + textureFormat: -1 + compressionQuality: 30 + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/ThumbStickPad.psd b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/ThumbStickPad.psd new file mode 100644 index 0000000..45ecdb3 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/ThumbStickPad.psd differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/ThumbStickPad.psd.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/ThumbStickPad.psd.meta new file mode 100644 index 0000000..43cbea8 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/ThumbStickPad.psd.meta @@ -0,0 +1,60 @@ +fileFormatVersion: 2 +guid: 3daa66d28163141a98814c55ab93f9ed +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 256 + textureSettings: + filterMode: 1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: + - buildTarget: Web + maxTextureSize: 128 + textureFormat: -3 + compressionQuality: 50 + - buildTarget: Standalone + maxTextureSize: 128 + textureFormat: -3 + compressionQuality: 50 + - buildTarget: iPhone + maxTextureSize: 128 + textureFormat: -3 + compressionQuality: 50 + - buildTarget: Android + maxTextureSize: 128 + textureFormat: -3 + compressionQuality: 50 + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Weapon.tif b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Weapon.tif new file mode 100644 index 0000000..06d18fd Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Weapon.tif differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Weapon.tif.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Weapon.tif.meta new file mode 100644 index 0000000..509e84d --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Textures/Weapon.tif.meta @@ -0,0 +1,64 @@ +fileFormatVersion: 2 +guid: de0f43d22fb984a41882402bdca3174a +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: 0 + buildTargetSettings: + - buildTarget: Web + maxTextureSize: 512 + textureFormat: -1 + compressionQuality: -1 + - buildTarget: Standalone + maxTextureSize: 512 + textureFormat: -1 + compressionQuality: -1 + - buildTarget: iPhone + maxTextureSize: 128 + textureFormat: -1 + compressionQuality: -1 + - buildTarget: Android + maxTextureSize: 128 + textureFormat: -1 + compressionQuality: -1 + - buildTarget: FlashPlayer + maxTextureSize: 1024 + textureFormat: -1 + compressionQuality: 0 + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AssertionExampleScene.unity b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AssertionExampleScene.unity new file mode 100644 index 0000000..2562b39 Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AssertionExampleScene.unity differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AssertionExampleScene.unity.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AssertionExampleScene.unity.meta new file mode 100644 index 0000000..5d3e9cf --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/AssertionExampleScene.unity.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 15e9f6c9f302e4f4f89b1c745fc59c29 +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/CodeBasedAssertionExample.cs b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/CodeBasedAssertionExample.cs new file mode 100644 index 0000000..54579a3 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/CodeBasedAssertionExample.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityTest; + +[IntegrationTest.DynamicTestAttribute("ExampleIntegrationTests")] +[IntegrationTest.SucceedWithAssertions] +public class CodeBasedAssertionExample : MonoBehaviour +{ + public float FloatField = 3; + + public GameObject goReference; + + public void Awake() + { + // An assertion that will compare a foat value from a custom component attached to a GameObject to a constant variable equal to 3. + // The comparasment will happen Start method and every 5 frames in the Update method + // Additionally, the comparer is configured to have accuracy of 0.1 for floating euqlity check. + IAssertionComponentConfigurator configurator; + var c = AssertionComponent.Create(out configurator, CheckMethod.Update | CheckMethod.Start, gameObject, "CodeBasedAssertionExample.FloatField", 3f); + configurator.UpdateCheckRepeatFrequency = 5; + c.floatingPointError = 0.1; + c.compareTypes = FloatComparer.CompareTypes.Equal; + + // Create an assertion that will fail is the FloatField from InitAssertions component of gameObject will change it's value + AssertionComponent.Create(CheckMethod.Update | CheckMethod.Start, gameObject, "CodeBasedAssertionExample.FloatField"); + + // Validate the gameObject.transform.y is always equal to 3 (defined in this component) + transform.position = new Vector3(0, 3, 0); + AssertionComponent.Create(CheckMethod.Update, gameObject, "CodeBasedAssertionExample.FloatField", gameObject, "transform.position.y"); + + // Check with the goReference field from this component is not set to null + goReference = gameObject; + var gc = AssertionComponent.Create(CheckMethod.Update, gameObject, "CodeBasedAssertionExample.goReference", null); + gc.compareType = GeneralComparer.CompareType.ANotEqualsB; + } +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/CodeBasedAssertionExample.cs.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/CodeBasedAssertionExample.cs.meta new file mode 100644 index 0000000..7c70fc7 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/CodeBasedAssertionExample.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 31a2431552d506445af31d7322ccb758 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/CustomComponent.cs b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/CustomComponent.cs new file mode 100644 index 0000000..f879b13 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/CustomComponent.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace UnityTest +{ + public class CustomComponent : MonoBehaviour + { + public float MyFloatProp { get; set; } + public float MyFloatField = 3; + } +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/CustomComponent.cs.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/CustomComponent.cs.meta new file mode 100644 index 0000000..e1093f5 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/CustomComponent.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0e28554b1d63f2945b90ee1bfdae9045 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/DynamicIntegrationTest.cs b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/DynamicIntegrationTest.cs new file mode 100644 index 0000000..0772d55 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/DynamicIntegrationTest.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +[IntegrationTest.DynamicTestAttribute("ExampleIntegrationTests")] +// [IntegrationTest.Ignore] +[IntegrationTest.ExpectExceptions(false, typeof(ArgumentException))] +[IntegrationTest.SucceedWithAssertions] +[IntegrationTest.TimeoutAttribute(1)] +[IntegrationTest.ExcludePlatformAttribute(RuntimePlatform.Android, RuntimePlatform.LinuxPlayer)] +public class DynamicIntegrationTest : MonoBehaviour +{ + public void Start() + { + IntegrationTest.Pass(gameObject); + } +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/DynamicIntegrationTest.cs.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/DynamicIntegrationTest.cs.meta new file mode 100644 index 0000000..c7b7553 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/DynamicIntegrationTest.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 382c8acec5676c047a67ed73ff0597f2 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/ExampleIntegrationTests.unity b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/ExampleIntegrationTests.unity new file mode 100644 index 0000000..8a97b1d Binary files /dev/null and b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/ExampleIntegrationTests.unity differ diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/ExampleIntegrationTests.unity.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/ExampleIntegrationTests.unity.meta new file mode 100644 index 0000000..1b63eba --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/ExampleIntegrationTests.unity.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 7f1b585d76653294caf31cf7b688c70c +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/ThrowCustomException.cs b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/ThrowCustomException.cs new file mode 100644 index 0000000..1845393 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/ThrowCustomException.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +public class ThrowCustomException : MonoBehaviour +{ + public void Start() + { + throw new CustomException(); + } + + private class CustomException : Exception + { + } +} diff --git a/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/ThrowCustomException.cs.meta b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/ThrowCustomException.cs.meta new file mode 100644 index 0000000..73e326f --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/IntegrationTestsFrameworkExamples/ThrowCustomException.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 944b8af45475eb847a80e8e6de431fcf +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/UnitTestExamples.meta b/Assets/UnityTestTools/TESTS/Examples/UnitTestExamples.meta new file mode 100644 index 0000000..92dd31e --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/UnitTestExamples.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 4e5e1964cf638d1418429b74c3d35091 +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/Examples/UnitTestExamples/Editor.meta b/Assets/UnityTestTools/TESTS/Examples/UnitTestExamples/Editor.meta new file mode 100644 index 0000000..0744fb9 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/UnitTestExamples/Editor.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e48c319810a169c45bb7ed9af7ea5414 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityTestTools/TESTS/Examples/UnitTestExamples/Editor/SampleTests.cs b/Assets/UnityTestTools/TESTS/Examples/UnitTestExamples/Editor/SampleTests.cs new file mode 100644 index 0000000..86abedb --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/UnitTestExamples/Editor/SampleTests.cs @@ -0,0 +1,102 @@ +using System; +using System.Collections.Generic; +using System.Threading; +using NUnit.Framework; +using UnityEngine; + +namespace UnityTest +{ + [TestFixture] + [Category("Sample Tests")] + internal class SampleTests + { + [Test] + [Category("Failing Tests")] + public void ExceptionTest() + { + throw new Exception("Exception throwing test"); + } + + [Test] + [Ignore("Ignored test")] + public void IgnoredTest() + { + throw new Exception("Ignored this test"); + } + + [Test] + [MaxTime(100)] + [Category("Failing Tests")] + public void SlowTest() + { + Thread.Sleep(200); + } + + [Test] + [Category("Failing Tests")] + public void FailingTest() + { + Assert.Fail(); + } + + [Test] + [Category("Failing Tests")] + public void InconclusiveTest() + { + Assert.Inconclusive(); + } + + [Test] + public void PassingTest() + { + Assert.Pass(); + } + + [Test] + public void ParameterizedTest([Values(1, 2, 3)] int a) + { + Assert.Pass(); + } + + [Test] + public void RangeTest([NUnit.Framework.Range(1, 10, 3)] int x) + { + Assert.Pass(); + } + + [Test] + [Culture("pl-PL")] + public void CultureSpecificTest() + { + } + + /*[Test] + [ExpectedException(typeof(ArgumentException), ExpectedMessage = "expected message")] + public void ExpectedExceptionTest() + { + throw new ArgumentException("expected message"); + }*/ + + [Datapoint] + public double zero = 0; + [Datapoint] + public double positive = 1; + [Datapoint] + public double negative = -1; + [Datapoint] + public double max = double.MaxValue; + [Datapoint] + public double infinity = double.PositiveInfinity; + + [Theory] + public void SquareRootDefinition(double num) + { + Assume.That(num >= 0.0 && num < double.MaxValue); + + var sqrt = Math.Sqrt(num); + + Assert.That(sqrt >= 0.0); + Assert.That(sqrt * sqrt, Is.EqualTo(num).Within(0.000001)); + } + } +} diff --git a/Assets/UnityTestTools/TESTS/Examples/UnitTestExamples/Editor/SampleTests.cs.meta b/Assets/UnityTestTools/TESTS/Examples/UnitTestExamples/Editor/SampleTests.cs.meta new file mode 100644 index 0000000..18a2818 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/Examples/UnitTestExamples/Editor/SampleTests.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4341aba9dbf1e514f8efbdb1e95b583e +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/UnityTestTools/TESTS/UnitTests.meta b/Assets/UnityTestTools/TESTS/UnitTests.meta new file mode 100644 index 0000000..aa3cbb7 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/UnitTests.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6ed7ab85e006ccd499358984d2aedcb2 +folderAsset: yes +timeCreated: 1493984171 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityTestTools/TESTS/UnitTests/Editor.meta b/Assets/UnityTestTools/TESTS/UnitTests/Editor.meta new file mode 100644 index 0000000..dd04f5c --- /dev/null +++ b/Assets/UnityTestTools/TESTS/UnitTests/Editor.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 9f2ce5ef02a6e4045ab2c26ad282dea6 +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/TESTS/UnitTests/Editor/UnitTests.cs b/Assets/UnityTestTools/TESTS/UnitTests/Editor/UnitTests.cs new file mode 100644 index 0000000..8138526 --- /dev/null +++ b/Assets/UnityTestTools/TESTS/UnitTests/Editor/UnitTests.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Threading; +using NUnit.Framework; +using UnityEngine; + +namespace UnityTest +{ + [TestFixture] + [Category("UnitTests")] + internal class UnitTests + { + [Test] + public void IsOddRangeTest([NUnit.Framework.Range(1, 10, 2)] int x) + { + if (x % 2 == 1) + { + Assert.Pass(); + } + else + { + Assert.Fail(); + } + } + + [Test] + public void GetAnglePositive() + { + Assert.AreEqual(45, Vector2.Angle(Vector2.right, new Vector2(1,1))); + } + + /*[Test] + public void GetAngleNegative() + { + Assert.AreEqual(-45, Vector2.Angle(Vector2.right, new Vector2(1, -1))); + }*/ + } +} diff --git a/Assets/UnityTestTools/TESTS/UnitTests/Editor/UnitTests.cs.meta b/Assets/UnityTestTools/TESTS/UnitTests/Editor/UnitTests.cs.meta new file mode 100644 index 0000000..366659e --- /dev/null +++ b/Assets/UnityTestTools/TESTS/UnitTests/Editor/UnitTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 940c2f6722504a34c9930246fde9d171 +timeCreated: 1493984105 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityTestTools/UnitTesting.meta b/Assets/UnityTestTools/UnitTesting.meta new file mode 100644 index 0000000..10d2dd5 --- /dev/null +++ b/Assets/UnityTestTools/UnitTesting.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 9a87f1db904f1e948a2385ab9961e3aa +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/UnitTesting/Editor.meta b/Assets/UnityTestTools/UnitTesting/Editor.meta new file mode 100644 index 0000000..802e986 --- /dev/null +++ b/Assets/UnityTestTools/UnitTesting/Editor.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 59b47eb3fc62eb44cb73a329a1e6b6cb +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/UnitTesting/Editor/NSubstitute.meta b/Assets/UnityTestTools/UnitTesting/Editor/NSubstitute.meta new file mode 100644 index 0000000..9a7cadb --- /dev/null +++ b/Assets/UnityTestTools/UnitTesting/Editor/NSubstitute.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 92b38897656771f409e9235955975754 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/UnityTestTools/UnitTesting/Editor/NSubstitute/NSubstitute.dll b/Assets/UnityTestTools/UnitTesting/Editor/NSubstitute/NSubstitute.dll new file mode 100644 index 0000000..ee8b155 Binary files /dev/null and b/Assets/UnityTestTools/UnitTesting/Editor/NSubstitute/NSubstitute.dll differ diff --git a/Assets/UnityTestTools/UnitTesting/Editor/NSubstitute/NSubstitute.dll.meta b/Assets/UnityTestTools/UnitTesting/Editor/NSubstitute/NSubstitute.dll.meta new file mode 100644 index 0000000..f6e6ac9 --- /dev/null +++ b/Assets/UnityTestTools/UnitTesting/Editor/NSubstitute/NSubstitute.dll.meta @@ -0,0 +1,64 @@ +fileFormatVersion: 2 +guid: 3c5e1afc6e0d68849ae6639aff58cfc7 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Android: + enabled: 0 + settings: + CPU: ARMv7 + Any: + enabled: 1 + settings: + Exclude Android: 1 + Exclude Editor: 0 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude OSXIntel: 1 + Exclude OSXIntel64: 1 + Exclude OSXUniversal: 1 + Exclude WebGL: 1 + Exclude Win: 1 + Exclude Win64: 1 + Editor: + enabled: 1 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + Linux: + enabled: 0 + settings: + CPU: x86 + Linux64: + enabled: 0 + settings: + CPU: x86_64 + OSXIntel: + enabled: 0 + settings: + CPU: AnyCPU + OSXIntel64: + enabled: 0 + settings: + CPU: AnyCPU + Win: + enabled: 0 + settings: + CPU: AnyCPU + Win64: + enabled: 0 + settings: + CPU: AnyCPU + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UnityTestTools/changelog.txt b/Assets/UnityTestTools/changelog.txt new file mode 100644 index 0000000..aff47a1 --- /dev/null +++ b/Assets/UnityTestTools/changelog.txt @@ -0,0 +1,221 @@ +Version 1.5.9 + +- Updated tools for Unity 5.4 +- Bugfixes + +Version 1.5.8 + +- Bugfixes + +Version 1.5.7 + +- Updated tools for Unity 5.3 + +Version 1.5.6 + +- Updated Mono.Cecil.dll and Mono.Cecil.Mdb.dll libraries + +Version 1.5.5 + +- Unit Tests Runner rendering improvments +- Platform runner can include auxiliary scenes +- other improvments and bugfixes + +Version 1.5.4 + +- APIs updates + +Version 1.5.3 + +- Bug fixes + +Version 1.5.2 + +- Bug fixes +- Minor improvments + +Version 1.5.1 + +- removed redundant and not applicable options +- fixed 5.0 related bugs + +Version 1.5.0 + +- Unity 5 related compatibility changes + +Version 1.4.6 + +- Bug fixes +- Minor improvments + +Version 1.4.5 + +- Added "Pause on test failure" option for integration tests +- bugfixes and code refactorization +- fixed UI bug where test details were not refreshed is the label was focused + +Version 1.4.4 + +- Minimal supported Unity version is now 4.3 +- UI changes +- code refactoring + +Version 1.4.3 + +- Remove reference to Resources.LoadAssetAtPath from runtime code + +Version 1.4.2 + +(assertion component) +- fixed string comparer bug that prevented updating the value + +(unit tests) +- unit test runner will log to stdout now +- fixes issues with opening tests in IDEs + +(integration tests) +- transform component is now visible for integration tests components +- added better support for mac's keyboard +- fixed 'succeed on assertion' for code generated assertion + +(other) +- minor bugfixes +- general improvments + +Version 1.4.1 + +- Fixed platform compilation issues +- Fixed typos in labels +- Removed docs and left a link to online docs +- Added Unity version and target platform to result files +- Other bugfixes + +Version 1.4 + +(integration tests) +- Platform runner will send the results back to the editor via TCP now +- Added naming convention for running tests in batch mode +- It's possible to cancel the run in the editor in between the tests now +- Added message filtering for integration tests results +- Added check for RegisterLogCallback in case something else overrides it +- Error messages will now fail integration tests +- Fixed dynamic integration tests not being properly reset +- Fixed platform runner for BlackBerry platform + +(assertion component) +- fixed the component editor + +(common) +- Made settings to be saved per project +- Fixed resolving icons when there are more UnityTestTools folders in the project +- Fixed process return code when running in batch mode + +Version 1.3.2 + +- Fixed integration tests performance issues + +Version 1.3.1 + +- Updated Japanese docs + +Version 1.3 + +Fixes: +(unit tests) +- nUnit will no longer change the Environment.CurrentDirectory when running tests +- fixed issues with asserting GameObject == null +(integration tests) +- fix the issue with passing or failing test in first frame +- fixed bug where ignored tests were still run in ITF +(assertion component) +- fixed resolving properties to include derived types + +Improvements: +(unit tests) +- refactored result renderer +- reenabled Random attribute +- added Category filter +- NSubstitute updated to version 1.7.2 +- result now will be dimmed after recompilation +- running tests in background will now work without having the window focused +- all assemblies in the project referencing 'nunit.framework' will now be included in the test list +(integration tests) +- updated platform exclusion mechanism +- refactored result renderer +- the runner should work even if the runner window is not focused +- added possibility to create integration tests from code +- the runner will now always run in background (if the window is not focused) +(assertion component) +- added API for creating assertions from code +- added new example +(common) +- GUI improvements +- you no longer need to change the path to icons when moving the tools to another directory +- made test details/results resizeable and scrollable +- added character escape for generated result XML + +Version 1.2.1 +- Fixed Unit Test Batch runner + +Version 1.2 +Fixes: +- Windows Store related compilation issues +- other +Improvements: +(unit tests) +- unit test runner can run in background now without having the runner window open +- unit test batch runner can take a result file path as a parameter +- changed undo system for unit test runner and UnityUnitTest base class +- execution time in now visible in test details +- fixed a bug with tests that inherit from a base test class +(integration tests) +- added hierarchical structure for integration tests +- added Player runner to automate running integration tests on platforms +- Integration tests batch runner can take a result directory as a parameter +- Integration tests batch runner can run tests on platforms +- results are rendered in a player +(assertion component) +- changed default failure messages +- it's possible to override failure action on comparer failure +- added code stripper for assertions. +- vast performance improvement +- fixed bugs +Other: +- "Hide in hierarchy" option was removed from integration test runner +- "Focus on selection" option was removed from integration test runner +- "Hide test runner" option was removed from integration test runner +- result files for unit tests and integration tests are now not generated when running tests from the editor +- UI improvements +- removed UnityScript and Boo examples +- WP8 compatibility fixes + +Version 1.1.1 +Other: +- Documentation in Japanese was added + +Version 1.1 +Fixes: +- fixed display error that happened when unit test class inherited from another TestFixture class +- fixed false positive result when "Succeed on assertions" was checked and no assertions were present in the test +- fixed XmlResultWriter to be generate XML file compatible with XSD scheme +- XmlResultWriter result writer was rewritten to remove XML libraries dependency +- Fixed an issue with a check that should be executed once after a specified frame in OnUpdate. +- added missing file UnityUnitTest.cs +Improvements: +- Added Japanese translation of the documentation +- ErrorPause value will be reverted to previous state after test run finishes +- Assertion Component will not copy reference to a GameObject if the GameObject is the same as the component is attached to. Instead, it will set the reference to the new GameObject. +- Integration tests batch runner can now run multiple scenes +- Unit test runner will now include tests written in UnityScript and Boo +- Unit tests will not run automatically if the compilation failes +- Added scene auto-save option to the Unit Test Runner +Other: +- changed icons +- restructured project files +- moved XmlResultWriter to Common folder +- added UnityScript and Boo unit tests examples +- added more unit tests examples +- Test runners visual adjustments + +Version 1.0 +- Initial release \ No newline at end of file diff --git a/Assets/UnityTestTools/changelog.txt.meta b/Assets/UnityTestTools/changelog.txt.meta new file mode 100644 index 0000000..8c28fef --- /dev/null +++ b/Assets/UnityTestTools/changelog.txt.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 29b770d9107643740b69cb98b00430aa +TextScriptImporter: + userData: diff --git a/Library/AnnotationManager b/Library/AnnotationManager new file mode 100644 index 0000000..0e5f9ab Binary files /dev/null and b/Library/AnnotationManager differ diff --git a/Library/AssetImportState b/Library/AssetImportState new file mode 100644 index 0000000..9a1ac96 --- /dev/null +++ b/Library/AssetImportState @@ -0,0 +1 @@ +5;0;6;0;0 \ No newline at end of file diff --git a/Library/AssetServerCacheV3 b/Library/AssetServerCacheV3 new file mode 100644 index 0000000..a214469 Binary files /dev/null and b/Library/AssetServerCacheV3 differ diff --git a/Library/BuildPlayer.prefs b/Library/BuildPlayer.prefs new file mode 100644 index 0000000..e69de29 diff --git a/Library/BuildSettings.asset b/Library/BuildSettings.asset new file mode 100644 index 0000000..8388173 Binary files /dev/null and b/Library/BuildSettings.asset differ diff --git a/Library/CurrentLayout.dwlt b/Library/CurrentLayout.dwlt new file mode 100644 index 0000000..2d1310a Binary files /dev/null and b/Library/CurrentLayout.dwlt differ diff --git a/Library/EditorUserBuildSettings.asset b/Library/EditorUserBuildSettings.asset new file mode 100644 index 0000000..c4a42cc Binary files /dev/null and b/Library/EditorUserBuildSettings.asset differ diff --git a/Library/EditorUserSettings.asset b/Library/EditorUserSettings.asset new file mode 100644 index 0000000..b6fea00 Binary files /dev/null and b/Library/EditorUserSettings.asset differ diff --git a/Library/InspectorExpandedItems.asset b/Library/InspectorExpandedItems.asset new file mode 100644 index 0000000..e31afa6 Binary files /dev/null and b/Library/InspectorExpandedItems.asset differ diff --git a/Library/LastSceneManagerSetup.txt b/Library/LastSceneManagerSetup.txt new file mode 100644 index 0000000..43070e6 --- /dev/null +++ b/Library/LastSceneManagerSetup.txt @@ -0,0 +1,4 @@ +sceneSetups: +- path: Assets/MainScene.unity + isLoaded: 1 + isActive: 1 diff --git a/Library/LibraryFormatVersion.txt b/Library/LibraryFormatVersion.txt new file mode 100644 index 0000000..6185f09 --- /dev/null +++ b/Library/LibraryFormatVersion.txt @@ -0,0 +1,2 @@ +unityRebuildLibraryVersion: 11 +unityForwardCompatibleVersion: 40 diff --git a/Library/MonoManager.asset b/Library/MonoManager.asset new file mode 100644 index 0000000..c9b3777 Binary files /dev/null and b/Library/MonoManager.asset differ diff --git a/Library/ProjectSettings.asset b/Library/ProjectSettings.asset new file mode 100644 index 0000000..628e04f Binary files /dev/null and b/Library/ProjectSettings.asset differ diff --git a/Library/ScriptAssemblies/Assembly-CSharp-Editor.dll b/Library/ScriptAssemblies/Assembly-CSharp-Editor.dll new file mode 100644 index 0000000..cbfbe04 Binary files /dev/null and b/Library/ScriptAssemblies/Assembly-CSharp-Editor.dll differ diff --git a/Library/ScriptAssemblies/Assembly-CSharp-Editor.dll.mdb b/Library/ScriptAssemblies/Assembly-CSharp-Editor.dll.mdb new file mode 100644 index 0000000..c234c45 Binary files /dev/null and b/Library/ScriptAssemblies/Assembly-CSharp-Editor.dll.mdb differ diff --git a/Library/ScriptAssemblies/Assembly-CSharp.dll b/Library/ScriptAssemblies/Assembly-CSharp.dll new file mode 100644 index 0000000..c93370b Binary files /dev/null and b/Library/ScriptAssemblies/Assembly-CSharp.dll differ diff --git a/Library/ScriptAssemblies/Assembly-CSharp.dll.mdb b/Library/ScriptAssemblies/Assembly-CSharp.dll.mdb new file mode 100644 index 0000000..6504178 Binary files /dev/null and b/Library/ScriptAssemblies/Assembly-CSharp.dll.mdb differ diff --git a/Library/ScriptAssemblies/BuiltinAssemblies.stamp b/Library/ScriptAssemblies/BuiltinAssemblies.stamp new file mode 100644 index 0000000..dfd668a --- /dev/null +++ b/Library/ScriptAssemblies/BuiltinAssemblies.stamp @@ -0,0 +1,2 @@ +0000.58ad7c8e.0000 +0000.58ad7ca0.0000 \ No newline at end of file diff --git a/Library/ScriptMapper b/Library/ScriptMapper new file mode 100644 index 0000000..b000718 Binary files /dev/null and b/Library/ScriptMapper differ diff --git a/Library/ShaderCache/4/449f6f51fed98584aba49a1a0bb7c0fc.bin b/Library/ShaderCache/4/449f6f51fed98584aba49a1a0bb7c0fc.bin new file mode 100644 index 0000000..d6d1f13 Binary files /dev/null and b/Library/ShaderCache/4/449f6f51fed98584aba49a1a0bb7c0fc.bin differ diff --git a/Library/ShaderCache/4/4b7391b4ffd7af13a74fa6d7d7f68509.bin b/Library/ShaderCache/4/4b7391b4ffd7af13a74fa6d7d7f68509.bin new file mode 100644 index 0000000..a978c3a Binary files /dev/null and b/Library/ShaderCache/4/4b7391b4ffd7af13a74fa6d7d7f68509.bin differ diff --git a/Library/ShaderCache/6/6aeff633778340a0310dbe6b1a25fd52.bin b/Library/ShaderCache/6/6aeff633778340a0310dbe6b1a25fd52.bin new file mode 100644 index 0000000..0d30117 Binary files /dev/null and b/Library/ShaderCache/6/6aeff633778340a0310dbe6b1a25fd52.bin differ diff --git a/Library/ShaderCache/a/aaafe528573d37f4124ed3e88bf08744.bin b/Library/ShaderCache/a/aaafe528573d37f4124ed3e88bf08744.bin new file mode 100644 index 0000000..e2346e6 Binary files /dev/null and b/Library/ShaderCache/a/aaafe528573d37f4124ed3e88bf08744.bin differ diff --git a/Library/ShaderCache/b/be1654d10c75f947781b9acc887c6522.bin b/Library/ShaderCache/b/be1654d10c75f947781b9acc887c6522.bin new file mode 100644 index 0000000..d6d1f13 Binary files /dev/null and b/Library/ShaderCache/b/be1654d10c75f947781b9acc887c6522.bin differ diff --git a/Library/ShaderCache/e/e9ab37192b21dc722a5fd2fe401deeba.bin b/Library/ShaderCache/e/e9ab37192b21dc722a5fd2fe401deeba.bin new file mode 100644 index 0000000..d4c4d55 Binary files /dev/null and b/Library/ShaderCache/e/e9ab37192b21dc722a5fd2fe401deeba.bin differ diff --git a/Library/assetDatabase3 b/Library/assetDatabase3 new file mode 100644 index 0000000..9fcb9cb Binary files /dev/null and b/Library/assetDatabase3 differ diff --git a/Library/expandedItems b/Library/expandedItems new file mode 100644 index 0000000..6de81bc Binary files /dev/null and b/Library/expandedItems differ diff --git a/Library/metadata/00/00000000000000001000000000000000 b/Library/metadata/00/00000000000000001000000000000000 new file mode 100644 index 0000000..fdc5966 Binary files /dev/null and b/Library/metadata/00/00000000000000001000000000000000 differ diff --git a/Library/metadata/00/00000000000000001000000000000000.info b/Library/metadata/00/00000000000000001000000000000000.info new file mode 100644 index 0000000..0a194ff Binary files /dev/null and b/Library/metadata/00/00000000000000001000000000000000.info differ diff --git a/Library/metadata/00/00000000000000002000000000000000 b/Library/metadata/00/00000000000000002000000000000000 new file mode 100644 index 0000000..4b7815c Binary files /dev/null and b/Library/metadata/00/00000000000000002000000000000000 differ diff --git a/Library/metadata/00/00000000000000002000000000000000.info b/Library/metadata/00/00000000000000002000000000000000.info new file mode 100644 index 0000000..650a329 Binary files /dev/null and b/Library/metadata/00/00000000000000002000000000000000.info differ diff --git a/Library/metadata/00/00000000000000003000000000000000 b/Library/metadata/00/00000000000000003000000000000000 new file mode 100644 index 0000000..a1254d7 Binary files /dev/null and b/Library/metadata/00/00000000000000003000000000000000 differ diff --git a/Library/metadata/00/00000000000000003000000000000000.info b/Library/metadata/00/00000000000000003000000000000000.info new file mode 100644 index 0000000..6f1239c Binary files /dev/null and b/Library/metadata/00/00000000000000003000000000000000.info differ diff --git a/Library/metadata/00/00000000000000004000000000000000 b/Library/metadata/00/00000000000000004000000000000000 new file mode 100644 index 0000000..815bcc7 Binary files /dev/null and b/Library/metadata/00/00000000000000004000000000000000 differ diff --git a/Library/metadata/00/00000000000000004000000000000000.info b/Library/metadata/00/00000000000000004000000000000000.info new file mode 100644 index 0000000..963c9de Binary files /dev/null and b/Library/metadata/00/00000000000000004000000000000000.info differ diff --git a/Library/metadata/00/00000000000000004100000000000000 b/Library/metadata/00/00000000000000004100000000000000 new file mode 100644 index 0000000..5bbf9a3 Binary files /dev/null and b/Library/metadata/00/00000000000000004100000000000000 differ diff --git a/Library/metadata/00/00000000000000004100000000000000.info b/Library/metadata/00/00000000000000004100000000000000.info new file mode 100644 index 0000000..98a4ff9 Binary files /dev/null and b/Library/metadata/00/00000000000000004100000000000000.info differ diff --git a/Library/metadata/00/00000000000000005000000000000000 b/Library/metadata/00/00000000000000005000000000000000 new file mode 100644 index 0000000..d5c8f81 Binary files /dev/null and b/Library/metadata/00/00000000000000005000000000000000 differ diff --git a/Library/metadata/00/00000000000000005000000000000000.info b/Library/metadata/00/00000000000000005000000000000000.info new file mode 100644 index 0000000..fade0c9 Binary files /dev/null and b/Library/metadata/00/00000000000000005000000000000000.info differ diff --git a/Library/metadata/00/00000000000000005100000000000000 b/Library/metadata/00/00000000000000005100000000000000 new file mode 100644 index 0000000..4c186f7 Binary files /dev/null and b/Library/metadata/00/00000000000000005100000000000000 differ diff --git a/Library/metadata/00/00000000000000005100000000000000.info b/Library/metadata/00/00000000000000005100000000000000.info new file mode 100644 index 0000000..baae292 Binary files /dev/null and b/Library/metadata/00/00000000000000005100000000000000.info differ diff --git a/Library/metadata/00/00000000000000006000000000000000 b/Library/metadata/00/00000000000000006000000000000000 new file mode 100644 index 0000000..84f91ab Binary files /dev/null and b/Library/metadata/00/00000000000000006000000000000000 differ diff --git a/Library/metadata/00/00000000000000006000000000000000.info b/Library/metadata/00/00000000000000006000000000000000.info new file mode 100644 index 0000000..020e772 Binary files /dev/null and b/Library/metadata/00/00000000000000006000000000000000.info differ diff --git a/Library/metadata/00/00000000000000006100000000000000 b/Library/metadata/00/00000000000000006100000000000000 new file mode 100644 index 0000000..983735c Binary files /dev/null and b/Library/metadata/00/00000000000000006100000000000000 differ diff --git a/Library/metadata/00/00000000000000006100000000000000.info b/Library/metadata/00/00000000000000006100000000000000.info new file mode 100644 index 0000000..b58d6a3 Binary files /dev/null and b/Library/metadata/00/00000000000000006100000000000000.info differ diff --git a/Library/metadata/00/00000000000000007000000000000000 b/Library/metadata/00/00000000000000007000000000000000 new file mode 100644 index 0000000..1a00f84 Binary files /dev/null and b/Library/metadata/00/00000000000000007000000000000000 differ diff --git a/Library/metadata/00/00000000000000007000000000000000.info b/Library/metadata/00/00000000000000007000000000000000.info new file mode 100644 index 0000000..5289be6 Binary files /dev/null and b/Library/metadata/00/00000000000000007000000000000000.info differ diff --git a/Library/metadata/00/00000000000000007100000000000000 b/Library/metadata/00/00000000000000007100000000000000 new file mode 100644 index 0000000..9594974 Binary files /dev/null and b/Library/metadata/00/00000000000000007100000000000000 differ diff --git a/Library/metadata/00/00000000000000007100000000000000.info b/Library/metadata/00/00000000000000007100000000000000.info new file mode 100644 index 0000000..a0a78b5 Binary files /dev/null and b/Library/metadata/00/00000000000000007100000000000000.info differ diff --git a/Library/metadata/00/00000000000000008000000000000000 b/Library/metadata/00/00000000000000008000000000000000 new file mode 100644 index 0000000..644fe19 Binary files /dev/null and b/Library/metadata/00/00000000000000008000000000000000 differ diff --git a/Library/metadata/00/00000000000000008000000000000000.info b/Library/metadata/00/00000000000000008000000000000000.info new file mode 100644 index 0000000..94385d4 Binary files /dev/null and b/Library/metadata/00/00000000000000008000000000000000.info differ diff --git a/Library/metadata/00/00000000000000009000000000000000 b/Library/metadata/00/00000000000000009000000000000000 new file mode 100644 index 0000000..cf36908 Binary files /dev/null and b/Library/metadata/00/00000000000000009000000000000000 differ diff --git a/Library/metadata/00/00000000000000009000000000000000.info b/Library/metadata/00/00000000000000009000000000000000.info new file mode 100644 index 0000000..5347fb6 Binary files /dev/null and b/Library/metadata/00/00000000000000009000000000000000.info differ diff --git a/Library/metadata/00/0000000000000000a000000000000000 b/Library/metadata/00/0000000000000000a000000000000000 new file mode 100644 index 0000000..b2d03eb Binary files /dev/null and b/Library/metadata/00/0000000000000000a000000000000000 differ diff --git a/Library/metadata/00/0000000000000000a000000000000000.info b/Library/metadata/00/0000000000000000a000000000000000.info new file mode 100644 index 0000000..32a7c62 Binary files /dev/null and b/Library/metadata/00/0000000000000000a000000000000000.info differ diff --git a/Library/metadata/00/0000000000000000a100000000000000 b/Library/metadata/00/0000000000000000a100000000000000 new file mode 100644 index 0000000..7885826 Binary files /dev/null and b/Library/metadata/00/0000000000000000a100000000000000 differ diff --git a/Library/metadata/00/0000000000000000a100000000000000.info b/Library/metadata/00/0000000000000000a100000000000000.info new file mode 100644 index 0000000..0827fee Binary files /dev/null and b/Library/metadata/00/0000000000000000a100000000000000.info differ diff --git a/Library/metadata/00/0000000000000000b000000000000000 b/Library/metadata/00/0000000000000000b000000000000000 new file mode 100644 index 0000000..09a3da2 Binary files /dev/null and b/Library/metadata/00/0000000000000000b000000000000000 differ diff --git a/Library/metadata/00/0000000000000000b000000000000000.info b/Library/metadata/00/0000000000000000b000000000000000.info new file mode 100644 index 0000000..54067b1 Binary files /dev/null and b/Library/metadata/00/0000000000000000b000000000000000.info differ diff --git a/Library/metadata/00/0000000000000000c000000000000000 b/Library/metadata/00/0000000000000000c000000000000000 new file mode 100644 index 0000000..00c3324 Binary files /dev/null and b/Library/metadata/00/0000000000000000c000000000000000 differ diff --git a/Library/metadata/00/0000000000000000c000000000000000.info b/Library/metadata/00/0000000000000000c000000000000000.info new file mode 100644 index 0000000..e71d9d3 Binary files /dev/null and b/Library/metadata/00/0000000000000000c000000000000000.info differ diff --git a/Library/metadata/05/05f064fa6dd2e4bca8bf926d92e92768 b/Library/metadata/05/05f064fa6dd2e4bca8bf926d92e92768 new file mode 100644 index 0000000..d736232 Binary files /dev/null and b/Library/metadata/05/05f064fa6dd2e4bca8bf926d92e92768 differ diff --git a/Library/metadata/05/05f064fa6dd2e4bca8bf926d92e92768.info b/Library/metadata/05/05f064fa6dd2e4bca8bf926d92e92768.info new file mode 100644 index 0000000..efbf0ab Binary files /dev/null and b/Library/metadata/05/05f064fa6dd2e4bca8bf926d92e92768.info differ diff --git a/Library/metadata/07/073a49e84f5bf4fc99b9f8a4d922f686 b/Library/metadata/07/073a49e84f5bf4fc99b9f8a4d922f686 new file mode 100644 index 0000000..acaa58d Binary files /dev/null and b/Library/metadata/07/073a49e84f5bf4fc99b9f8a4d922f686 differ diff --git a/Library/metadata/07/073a49e84f5bf4fc99b9f8a4d922f686.info b/Library/metadata/07/073a49e84f5bf4fc99b9f8a4d922f686.info new file mode 100644 index 0000000..4be59dd Binary files /dev/null and b/Library/metadata/07/073a49e84f5bf4fc99b9f8a4d922f686.info differ diff --git a/Library/metadata/0a/0abfe96427c94431ea30534f71ef5e8d b/Library/metadata/0a/0abfe96427c94431ea30534f71ef5e8d new file mode 100644 index 0000000..7b52021 Binary files /dev/null and b/Library/metadata/0a/0abfe96427c94431ea30534f71ef5e8d differ diff --git a/Library/metadata/0a/0abfe96427c94431ea30534f71ef5e8d.info b/Library/metadata/0a/0abfe96427c94431ea30534f71ef5e8d.info new file mode 100644 index 0000000..1311b88 Binary files /dev/null and b/Library/metadata/0a/0abfe96427c94431ea30534f71ef5e8d.info differ diff --git a/Library/metadata/0b/0b254e901b0f10149adb697fca598d58 b/Library/metadata/0b/0b254e901b0f10149adb697fca598d58 new file mode 100644 index 0000000..3688b74 Binary files /dev/null and b/Library/metadata/0b/0b254e901b0f10149adb697fca598d58 differ diff --git a/Library/metadata/0b/0b254e901b0f10149adb697fca598d58.info b/Library/metadata/0b/0b254e901b0f10149adb697fca598d58.info new file mode 100644 index 0000000..6c6d156 Binary files /dev/null and b/Library/metadata/0b/0b254e901b0f10149adb697fca598d58.info differ diff --git a/Library/metadata/0c/0cb024d8679844c6eb046f7246df9eb0 b/Library/metadata/0c/0cb024d8679844c6eb046f7246df9eb0 new file mode 100644 index 0000000..f367a38 Binary files /dev/null and b/Library/metadata/0c/0cb024d8679844c6eb046f7246df9eb0 differ diff --git a/Library/metadata/0c/0cb024d8679844c6eb046f7246df9eb0.info b/Library/metadata/0c/0cb024d8679844c6eb046f7246df9eb0.info new file mode 100644 index 0000000..03860f2 Binary files /dev/null and b/Library/metadata/0c/0cb024d8679844c6eb046f7246df9eb0.info differ diff --git a/Library/metadata/0d/0d3bb855445e36e479c85976fc88383a b/Library/metadata/0d/0d3bb855445e36e479c85976fc88383a new file mode 100644 index 0000000..e004ba3 Binary files /dev/null and b/Library/metadata/0d/0d3bb855445e36e479c85976fc88383a differ diff --git a/Library/metadata/0d/0d3bb855445e36e479c85976fc88383a.info b/Library/metadata/0d/0d3bb855445e36e479c85976fc88383a.info new file mode 100644 index 0000000..4b71158 Binary files /dev/null and b/Library/metadata/0d/0d3bb855445e36e479c85976fc88383a.info differ diff --git a/Library/metadata/0e/0e7e97b1cd97e1f48ab796f427418924 b/Library/metadata/0e/0e7e97b1cd97e1f48ab796f427418924 new file mode 100644 index 0000000..a8c4c75 Binary files /dev/null and b/Library/metadata/0e/0e7e97b1cd97e1f48ab796f427418924 differ diff --git a/Library/metadata/0e/0e7e97b1cd97e1f48ab796f427418924.info b/Library/metadata/0e/0e7e97b1cd97e1f48ab796f427418924.info new file mode 100644 index 0000000..267e892 Binary files /dev/null and b/Library/metadata/0e/0e7e97b1cd97e1f48ab796f427418924.info differ diff --git a/Library/metadata/12/121609090924eda4eb25288ad5077e7a b/Library/metadata/12/121609090924eda4eb25288ad5077e7a new file mode 100644 index 0000000..cd980c5 Binary files /dev/null and b/Library/metadata/12/121609090924eda4eb25288ad5077e7a differ diff --git a/Library/metadata/12/121609090924eda4eb25288ad5077e7a.info b/Library/metadata/12/121609090924eda4eb25288ad5077e7a.info new file mode 100644 index 0000000..caa734c Binary files /dev/null and b/Library/metadata/12/121609090924eda4eb25288ad5077e7a.info differ diff --git a/Library/metadata/12/1275a4b5d402c466b8513a1dd6af1bf0 b/Library/metadata/12/1275a4b5d402c466b8513a1dd6af1bf0 new file mode 100644 index 0000000..95512f2 Binary files /dev/null and b/Library/metadata/12/1275a4b5d402c466b8513a1dd6af1bf0 differ diff --git a/Library/metadata/12/1275a4b5d402c466b8513a1dd6af1bf0.info b/Library/metadata/12/1275a4b5d402c466b8513a1dd6af1bf0.info new file mode 100644 index 0000000..a06008b Binary files /dev/null and b/Library/metadata/12/1275a4b5d402c466b8513a1dd6af1bf0.info differ diff --git a/Library/metadata/12/12fd8a0055b84bb59e84c9835a37e333 b/Library/metadata/12/12fd8a0055b84bb59e84c9835a37e333 new file mode 100644 index 0000000..12d8782 Binary files /dev/null and b/Library/metadata/12/12fd8a0055b84bb59e84c9835a37e333 differ diff --git a/Library/metadata/12/12fd8a0055b84bb59e84c9835a37e333.info b/Library/metadata/12/12fd8a0055b84bb59e84c9835a37e333.info new file mode 100644 index 0000000..a0875a0 Binary files /dev/null and b/Library/metadata/12/12fd8a0055b84bb59e84c9835a37e333.info differ diff --git a/Library/metadata/14/14d94b8fd70c642ec96867ac2ef99a15 b/Library/metadata/14/14d94b8fd70c642ec96867ac2ef99a15 new file mode 100644 index 0000000..30bd832 Binary files /dev/null and b/Library/metadata/14/14d94b8fd70c642ec96867ac2ef99a15 differ diff --git a/Library/metadata/14/14d94b8fd70c642ec96867ac2ef99a15.info b/Library/metadata/14/14d94b8fd70c642ec96867ac2ef99a15.info new file mode 100644 index 0000000..f847a10 Binary files /dev/null and b/Library/metadata/14/14d94b8fd70c642ec96867ac2ef99a15.info differ diff --git a/Library/metadata/18/1842a2caae89b43509b14caffe445547 b/Library/metadata/18/1842a2caae89b43509b14caffe445547 new file mode 100644 index 0000000..7b10bd5 Binary files /dev/null and b/Library/metadata/18/1842a2caae89b43509b14caffe445547 differ diff --git a/Library/metadata/18/1842a2caae89b43509b14caffe445547.info b/Library/metadata/18/1842a2caae89b43509b14caffe445547.info new file mode 100644 index 0000000..9cb54db Binary files /dev/null and b/Library/metadata/18/1842a2caae89b43509b14caffe445547.info differ diff --git a/Library/metadata/1c/1c6d1fbb51834b64847b1b73a75bfc77 b/Library/metadata/1c/1c6d1fbb51834b64847b1b73a75bfc77 new file mode 100644 index 0000000..4328e4f Binary files /dev/null and b/Library/metadata/1c/1c6d1fbb51834b64847b1b73a75bfc77 differ diff --git a/Library/metadata/1c/1c6d1fbb51834b64847b1b73a75bfc77.info b/Library/metadata/1c/1c6d1fbb51834b64847b1b73a75bfc77.info new file mode 100644 index 0000000..5700bba Binary files /dev/null and b/Library/metadata/1c/1c6d1fbb51834b64847b1b73a75bfc77.info differ diff --git a/Library/metadata/1f/1f9d39d55cc8e45419491b9783725f3d b/Library/metadata/1f/1f9d39d55cc8e45419491b9783725f3d new file mode 100644 index 0000000..48b1de7 Binary files /dev/null and b/Library/metadata/1f/1f9d39d55cc8e45419491b9783725f3d differ diff --git a/Library/metadata/1f/1f9d39d55cc8e45419491b9783725f3d.info b/Library/metadata/1f/1f9d39d55cc8e45419491b9783725f3d.info new file mode 100644 index 0000000..9c60d04 Binary files /dev/null and b/Library/metadata/1f/1f9d39d55cc8e45419491b9783725f3d.info differ diff --git a/Library/metadata/20/20b3948a717fa4d108f588889497fe14 b/Library/metadata/20/20b3948a717fa4d108f588889497fe14 new file mode 100644 index 0000000..6a1a059 Binary files /dev/null and b/Library/metadata/20/20b3948a717fa4d108f588889497fe14 differ diff --git a/Library/metadata/20/20b3948a717fa4d108f588889497fe14.info b/Library/metadata/20/20b3948a717fa4d108f588889497fe14.info new file mode 100644 index 0000000..2d3b048 Binary files /dev/null and b/Library/metadata/20/20b3948a717fa4d108f588889497fe14.info differ diff --git a/Library/metadata/21/21eff446d50eaf44a85985cd4c0b6fa1 b/Library/metadata/21/21eff446d50eaf44a85985cd4c0b6fa1 new file mode 100644 index 0000000..0136d5e Binary files /dev/null and b/Library/metadata/21/21eff446d50eaf44a85985cd4c0b6fa1 differ diff --git a/Library/metadata/21/21eff446d50eaf44a85985cd4c0b6fa1.info b/Library/metadata/21/21eff446d50eaf44a85985cd4c0b6fa1.info new file mode 100644 index 0000000..084273e Binary files /dev/null and b/Library/metadata/21/21eff446d50eaf44a85985cd4c0b6fa1.info differ diff --git a/Library/metadata/23/2388a46385aa54a32b8bed7539e6938e b/Library/metadata/23/2388a46385aa54a32b8bed7539e6938e new file mode 100644 index 0000000..167233e Binary files /dev/null and b/Library/metadata/23/2388a46385aa54a32b8bed7539e6938e differ diff --git a/Library/metadata/23/2388a46385aa54a32b8bed7539e6938e.info b/Library/metadata/23/2388a46385aa54a32b8bed7539e6938e.info new file mode 100644 index 0000000..d78454a Binary files /dev/null and b/Library/metadata/23/2388a46385aa54a32b8bed7539e6938e.info differ diff --git a/Library/metadata/26/2682a692a2be7e14e901a738c7806da0 b/Library/metadata/26/2682a692a2be7e14e901a738c7806da0 new file mode 100644 index 0000000..b81efae Binary files /dev/null and b/Library/metadata/26/2682a692a2be7e14e901a738c7806da0 differ diff --git a/Library/metadata/26/2682a692a2be7e14e901a738c7806da0.info b/Library/metadata/26/2682a692a2be7e14e901a738c7806da0.info new file mode 100644 index 0000000..e9959ab Binary files /dev/null and b/Library/metadata/26/2682a692a2be7e14e901a738c7806da0.info differ diff --git a/Library/metadata/26/268777704ae5d4444ad8d13d91fc0b6f b/Library/metadata/26/268777704ae5d4444ad8d13d91fc0b6f new file mode 100644 index 0000000..93f8119 Binary files /dev/null and b/Library/metadata/26/268777704ae5d4444ad8d13d91fc0b6f differ diff --git a/Library/metadata/26/268777704ae5d4444ad8d13d91fc0b6f.info b/Library/metadata/26/268777704ae5d4444ad8d13d91fc0b6f.info new file mode 100644 index 0000000..65a3313 Binary files /dev/null and b/Library/metadata/26/268777704ae5d4444ad8d13d91fc0b6f.info differ diff --git a/Library/metadata/27/2730f19cc58e6415d821899d3250a4c5 b/Library/metadata/27/2730f19cc58e6415d821899d3250a4c5 new file mode 100644 index 0000000..f3b2a56 Binary files /dev/null and b/Library/metadata/27/2730f19cc58e6415d821899d3250a4c5 differ diff --git a/Library/metadata/27/2730f19cc58e6415d821899d3250a4c5.info b/Library/metadata/27/2730f19cc58e6415d821899d3250a4c5.info new file mode 100644 index 0000000..8471866 Binary files /dev/null and b/Library/metadata/27/2730f19cc58e6415d821899d3250a4c5.info differ diff --git a/Library/metadata/2e/2e146d7ea4bf7476a83623a39f775965 b/Library/metadata/2e/2e146d7ea4bf7476a83623a39f775965 new file mode 100644 index 0000000..becbe93 Binary files /dev/null and b/Library/metadata/2e/2e146d7ea4bf7476a83623a39f775965 differ diff --git a/Library/metadata/2e/2e146d7ea4bf7476a83623a39f775965.info b/Library/metadata/2e/2e146d7ea4bf7476a83623a39f775965.info new file mode 100644 index 0000000..8f38ee4 Binary files /dev/null and b/Library/metadata/2e/2e146d7ea4bf7476a83623a39f775965.info differ diff --git a/Library/metadata/2f/2fc0a2eb644d80746b7429c7cedf4c28 b/Library/metadata/2f/2fc0a2eb644d80746b7429c7cedf4c28 new file mode 100644 index 0000000..b032a1a Binary files /dev/null and b/Library/metadata/2f/2fc0a2eb644d80746b7429c7cedf4c28 differ diff --git a/Library/metadata/2f/2fc0a2eb644d80746b7429c7cedf4c28.info b/Library/metadata/2f/2fc0a2eb644d80746b7429c7cedf4c28.info new file mode 100644 index 0000000..0c41244 Binary files /dev/null and b/Library/metadata/2f/2fc0a2eb644d80746b7429c7cedf4c28.info differ diff --git a/Library/metadata/2f/2fe3476eabbbb6c448e6b55a2cc471f5 b/Library/metadata/2f/2fe3476eabbbb6c448e6b55a2cc471f5 new file mode 100644 index 0000000..55820ca Binary files /dev/null and b/Library/metadata/2f/2fe3476eabbbb6c448e6b55a2cc471f5 differ diff --git a/Library/metadata/2f/2fe3476eabbbb6c448e6b55a2cc471f5.info b/Library/metadata/2f/2fe3476eabbbb6c448e6b55a2cc471f5.info new file mode 100644 index 0000000..b7d8e89 Binary files /dev/null and b/Library/metadata/2f/2fe3476eabbbb6c448e6b55a2cc471f5.info differ diff --git a/Library/metadata/30/307433eba81a469ab1e2084d52d1a5a2 b/Library/metadata/30/307433eba81a469ab1e2084d52d1a5a2 new file mode 100644 index 0000000..6f809bf Binary files /dev/null and b/Library/metadata/30/307433eba81a469ab1e2084d52d1a5a2 differ diff --git a/Library/metadata/30/307433eba81a469ab1e2084d52d1a5a2.info b/Library/metadata/30/307433eba81a469ab1e2084d52d1a5a2.info new file mode 100644 index 0000000..2548157 Binary files /dev/null and b/Library/metadata/30/307433eba81a469ab1e2084d52d1a5a2.info differ diff --git a/Library/metadata/31/31429b7c4394649458f04cc406064344 b/Library/metadata/31/31429b7c4394649458f04cc406064344 new file mode 100644 index 0000000..51d1df0 Binary files /dev/null and b/Library/metadata/31/31429b7c4394649458f04cc406064344 differ diff --git a/Library/metadata/31/31429b7c4394649458f04cc406064344.info b/Library/metadata/31/31429b7c4394649458f04cc406064344.info new file mode 100644 index 0000000..7b62df0 Binary files /dev/null and b/Library/metadata/31/31429b7c4394649458f04cc406064344.info differ diff --git a/Library/metadata/31/31e793789488245609c7ee2d806c6d32 b/Library/metadata/31/31e793789488245609c7ee2d806c6d32 new file mode 100644 index 0000000..0b12334 Binary files /dev/null and b/Library/metadata/31/31e793789488245609c7ee2d806c6d32 differ diff --git a/Library/metadata/31/31e793789488245609c7ee2d806c6d32.info b/Library/metadata/31/31e793789488245609c7ee2d806c6d32.info new file mode 100644 index 0000000..849b153 Binary files /dev/null and b/Library/metadata/31/31e793789488245609c7ee2d806c6d32.info differ diff --git a/Library/metadata/32/32188fd89022c154c81befa2f0e00be0 b/Library/metadata/32/32188fd89022c154c81befa2f0e00be0 new file mode 100644 index 0000000..d9bcd90 Binary files /dev/null and b/Library/metadata/32/32188fd89022c154c81befa2f0e00be0 differ diff --git a/Library/metadata/32/32188fd89022c154c81befa2f0e00be0.info b/Library/metadata/32/32188fd89022c154c81befa2f0e00be0.info new file mode 100644 index 0000000..f353132 Binary files /dev/null and b/Library/metadata/32/32188fd89022c154c81befa2f0e00be0.info differ diff --git a/Library/metadata/32/324efa12060f26d4583417180dfbdf2e b/Library/metadata/32/324efa12060f26d4583417180dfbdf2e new file mode 100644 index 0000000..2f58612 Binary files /dev/null and b/Library/metadata/32/324efa12060f26d4583417180dfbdf2e differ diff --git a/Library/metadata/32/324efa12060f26d4583417180dfbdf2e.info b/Library/metadata/32/324efa12060f26d4583417180dfbdf2e.info new file mode 100644 index 0000000..b84d427 Binary files /dev/null and b/Library/metadata/32/324efa12060f26d4583417180dfbdf2e.info differ diff --git a/Library/metadata/32/328cc881519068e4eb7db4bb907ad2d9 b/Library/metadata/32/328cc881519068e4eb7db4bb907ad2d9 new file mode 100644 index 0000000..fa4776d Binary files /dev/null and b/Library/metadata/32/328cc881519068e4eb7db4bb907ad2d9 differ diff --git a/Library/metadata/32/328cc881519068e4eb7db4bb907ad2d9.info b/Library/metadata/32/328cc881519068e4eb7db4bb907ad2d9.info new file mode 100644 index 0000000..65d5010 Binary files /dev/null and b/Library/metadata/32/328cc881519068e4eb7db4bb907ad2d9.info differ diff --git a/Library/metadata/32/3294459318d7144f2938f60ff97f5e6b b/Library/metadata/32/3294459318d7144f2938f60ff97f5e6b new file mode 100644 index 0000000..8c5f629 Binary files /dev/null and b/Library/metadata/32/3294459318d7144f2938f60ff97f5e6b differ diff --git a/Library/metadata/32/3294459318d7144f2938f60ff97f5e6b.info b/Library/metadata/32/3294459318d7144f2938f60ff97f5e6b.info new file mode 100644 index 0000000..7e0c1a5 Binary files /dev/null and b/Library/metadata/32/3294459318d7144f2938f60ff97f5e6b.info differ diff --git a/Library/metadata/34/3461d6712015f46d390fafbfa56be057 b/Library/metadata/34/3461d6712015f46d390fafbfa56be057 new file mode 100644 index 0000000..ba0ee85 Binary files /dev/null and b/Library/metadata/34/3461d6712015f46d390fafbfa56be057 differ diff --git a/Library/metadata/34/3461d6712015f46d390fafbfa56be057.info b/Library/metadata/34/3461d6712015f46d390fafbfa56be057.info new file mode 100644 index 0000000..6b352ff Binary files /dev/null and b/Library/metadata/34/3461d6712015f46d390fafbfa56be057.info differ diff --git a/Library/metadata/35/354e549002c5a49a79e1dc8d5cf74df2 b/Library/metadata/35/354e549002c5a49a79e1dc8d5cf74df2 new file mode 100644 index 0000000..1a5cf4b Binary files /dev/null and b/Library/metadata/35/354e549002c5a49a79e1dc8d5cf74df2 differ diff --git a/Library/metadata/35/354e549002c5a49a79e1dc8d5cf74df2.info b/Library/metadata/35/354e549002c5a49a79e1dc8d5cf74df2.info new file mode 100644 index 0000000..daafc69 Binary files /dev/null and b/Library/metadata/35/354e549002c5a49a79e1dc8d5cf74df2.info differ diff --git a/Library/metadata/36/362d742c28ae8421f8ee919cd2b17aba b/Library/metadata/36/362d742c28ae8421f8ee919cd2b17aba new file mode 100644 index 0000000..4578949 Binary files /dev/null and b/Library/metadata/36/362d742c28ae8421f8ee919cd2b17aba differ diff --git a/Library/metadata/36/362d742c28ae8421f8ee919cd2b17aba.info b/Library/metadata/36/362d742c28ae8421f8ee919cd2b17aba.info new file mode 100644 index 0000000..c41965a Binary files /dev/null and b/Library/metadata/36/362d742c28ae8421f8ee919cd2b17aba.info differ diff --git a/Library/metadata/36/36fe7088c914c2e49a56c4ed967d0f2f b/Library/metadata/36/36fe7088c914c2e49a56c4ed967d0f2f new file mode 100644 index 0000000..ca8dcc7 Binary files /dev/null and b/Library/metadata/36/36fe7088c914c2e49a56c4ed967d0f2f differ diff --git a/Library/metadata/36/36fe7088c914c2e49a56c4ed967d0f2f.info b/Library/metadata/36/36fe7088c914c2e49a56c4ed967d0f2f.info new file mode 100644 index 0000000..e5d4357 Binary files /dev/null and b/Library/metadata/36/36fe7088c914c2e49a56c4ed967d0f2f.info differ diff --git a/Library/metadata/3a/3aa5ed335f15c43169a7097f25d7aecd b/Library/metadata/3a/3aa5ed335f15c43169a7097f25d7aecd new file mode 100644 index 0000000..ad7265d Binary files /dev/null and b/Library/metadata/3a/3aa5ed335f15c43169a7097f25d7aecd differ diff --git a/Library/metadata/3a/3aa5ed335f15c43169a7097f25d7aecd.info b/Library/metadata/3a/3aa5ed335f15c43169a7097f25d7aecd.info new file mode 100644 index 0000000..fe40d3b Binary files /dev/null and b/Library/metadata/3a/3aa5ed335f15c43169a7097f25d7aecd.info differ diff --git a/Library/metadata/3c/3c0ad459c1534645b5d603b7cc258f97 b/Library/metadata/3c/3c0ad459c1534645b5d603b7cc258f97 new file mode 100644 index 0000000..fcc572e Binary files /dev/null and b/Library/metadata/3c/3c0ad459c1534645b5d603b7cc258f97 differ diff --git a/Library/metadata/3c/3c0ad459c1534645b5d603b7cc258f97.info b/Library/metadata/3c/3c0ad459c1534645b5d603b7cc258f97.info new file mode 100644 index 0000000..7ba4904 Binary files /dev/null and b/Library/metadata/3c/3c0ad459c1534645b5d603b7cc258f97.info differ diff --git a/Library/metadata/3d/3d4c117c5c4564ed1bbb47ff4697a460 b/Library/metadata/3d/3d4c117c5c4564ed1bbb47ff4697a460 new file mode 100644 index 0000000..9cc04de Binary files /dev/null and b/Library/metadata/3d/3d4c117c5c4564ed1bbb47ff4697a460 differ diff --git a/Library/metadata/3d/3d4c117c5c4564ed1bbb47ff4697a460.info b/Library/metadata/3d/3d4c117c5c4564ed1bbb47ff4697a460.info new file mode 100644 index 0000000..647b2fd Binary files /dev/null and b/Library/metadata/3d/3d4c117c5c4564ed1bbb47ff4697a460.info differ diff --git a/Library/metadata/40/40988b99190bc5848a99e6a6a236572e b/Library/metadata/40/40988b99190bc5848a99e6a6a236572e new file mode 100644 index 0000000..dfed663 Binary files /dev/null and b/Library/metadata/40/40988b99190bc5848a99e6a6a236572e differ diff --git a/Library/metadata/40/40988b99190bc5848a99e6a6a236572e.info b/Library/metadata/40/40988b99190bc5848a99e6a6a236572e.info new file mode 100644 index 0000000..e2684e0 Binary files /dev/null and b/Library/metadata/40/40988b99190bc5848a99e6a6a236572e.info differ diff --git a/Library/metadata/40/40c6ff6dbde0b48c0a919d390bc9edaf b/Library/metadata/40/40c6ff6dbde0b48c0a919d390bc9edaf new file mode 100644 index 0000000..86fa8e0 Binary files /dev/null and b/Library/metadata/40/40c6ff6dbde0b48c0a919d390bc9edaf differ diff --git a/Library/metadata/40/40c6ff6dbde0b48c0a919d390bc9edaf.info b/Library/metadata/40/40c6ff6dbde0b48c0a919d390bc9edaf.info new file mode 100644 index 0000000..cb481d3 Binary files /dev/null and b/Library/metadata/40/40c6ff6dbde0b48c0a919d390bc9edaf.info differ diff --git a/Library/metadata/41/4113173d5e95493ab8765d7b08371de4 b/Library/metadata/41/4113173d5e95493ab8765d7b08371de4 new file mode 100644 index 0000000..b97050b Binary files /dev/null and b/Library/metadata/41/4113173d5e95493ab8765d7b08371de4 differ diff --git a/Library/metadata/41/4113173d5e95493ab8765d7b08371de4.info b/Library/metadata/41/4113173d5e95493ab8765d7b08371de4.info new file mode 100644 index 0000000..3745e96 Binary files /dev/null and b/Library/metadata/41/4113173d5e95493ab8765d7b08371de4.info differ diff --git a/Library/metadata/42/4281987d9375d0a40ad0f27cf74d9446 b/Library/metadata/42/4281987d9375d0a40ad0f27cf74d9446 new file mode 100644 index 0000000..ea54313 Binary files /dev/null and b/Library/metadata/42/4281987d9375d0a40ad0f27cf74d9446 differ diff --git a/Library/metadata/42/4281987d9375d0a40ad0f27cf74d9446.info b/Library/metadata/42/4281987d9375d0a40ad0f27cf74d9446.info new file mode 100644 index 0000000..ce954f6 Binary files /dev/null and b/Library/metadata/42/4281987d9375d0a40ad0f27cf74d9446.info differ diff --git a/Library/metadata/43/435ebe0d11086ba44a9f17e7ca12ccda b/Library/metadata/43/435ebe0d11086ba44a9f17e7ca12ccda new file mode 100644 index 0000000..dbc792d Binary files /dev/null and b/Library/metadata/43/435ebe0d11086ba44a9f17e7ca12ccda differ diff --git a/Library/metadata/43/435ebe0d11086ba44a9f17e7ca12ccda.info b/Library/metadata/43/435ebe0d11086ba44a9f17e7ca12ccda.info new file mode 100644 index 0000000..1bc9f79 Binary files /dev/null and b/Library/metadata/43/435ebe0d11086ba44a9f17e7ca12ccda.info differ diff --git a/Library/metadata/49/495231f6a63da934784b9aa7dbf1e495 b/Library/metadata/49/495231f6a63da934784b9aa7dbf1e495 new file mode 100644 index 0000000..a08541b Binary files /dev/null and b/Library/metadata/49/495231f6a63da934784b9aa7dbf1e495 differ diff --git a/Library/metadata/49/495231f6a63da934784b9aa7dbf1e495.info b/Library/metadata/49/495231f6a63da934784b9aa7dbf1e495.info new file mode 100644 index 0000000..7670554 Binary files /dev/null and b/Library/metadata/49/495231f6a63da934784b9aa7dbf1e495.info differ diff --git a/Library/metadata/49/4984c4be0be4ec6438731e8937580ba4 b/Library/metadata/49/4984c4be0be4ec6438731e8937580ba4 new file mode 100644 index 0000000..81c8967 Binary files /dev/null and b/Library/metadata/49/4984c4be0be4ec6438731e8937580ba4 differ diff --git a/Library/metadata/49/4984c4be0be4ec6438731e8937580ba4.info b/Library/metadata/49/4984c4be0be4ec6438731e8937580ba4.info new file mode 100644 index 0000000..816e6a5 Binary files /dev/null and b/Library/metadata/49/4984c4be0be4ec6438731e8937580ba4.info differ diff --git a/Library/metadata/49/49c94adaaede94d10a249c6e6d70e941 b/Library/metadata/49/49c94adaaede94d10a249c6e6d70e941 new file mode 100644 index 0000000..034efce Binary files /dev/null and b/Library/metadata/49/49c94adaaede94d10a249c6e6d70e941 differ diff --git a/Library/metadata/49/49c94adaaede94d10a249c6e6d70e941.info b/Library/metadata/49/49c94adaaede94d10a249c6e6d70e941.info new file mode 100644 index 0000000..66dbc62 Binary files /dev/null and b/Library/metadata/49/49c94adaaede94d10a249c6e6d70e941.info differ diff --git a/Library/metadata/49/49f5766d0d4954f44b85d4bbd7131677 b/Library/metadata/49/49f5766d0d4954f44b85d4bbd7131677 new file mode 100644 index 0000000..c49f8b2 Binary files /dev/null and b/Library/metadata/49/49f5766d0d4954f44b85d4bbd7131677 differ diff --git a/Library/metadata/49/49f5766d0d4954f44b85d4bbd7131677.info b/Library/metadata/49/49f5766d0d4954f44b85d4bbd7131677.info new file mode 100644 index 0000000..d77eade Binary files /dev/null and b/Library/metadata/49/49f5766d0d4954f44b85d4bbd7131677.info differ diff --git a/Library/metadata/4a/4a38b7387dae1ea4193e4dedbaf690a9 b/Library/metadata/4a/4a38b7387dae1ea4193e4dedbaf690a9 new file mode 100644 index 0000000..eb010e4 Binary files /dev/null and b/Library/metadata/4a/4a38b7387dae1ea4193e4dedbaf690a9 differ diff --git a/Library/metadata/4a/4a38b7387dae1ea4193e4dedbaf690a9.info b/Library/metadata/4a/4a38b7387dae1ea4193e4dedbaf690a9.info new file mode 100644 index 0000000..c5a599e Binary files /dev/null and b/Library/metadata/4a/4a38b7387dae1ea4193e4dedbaf690a9.info differ diff --git a/Library/metadata/4a/4a99bec4a731ff1449a10ff9ccbfc069 b/Library/metadata/4a/4a99bec4a731ff1449a10ff9ccbfc069 new file mode 100644 index 0000000..ff77d78 Binary files /dev/null and b/Library/metadata/4a/4a99bec4a731ff1449a10ff9ccbfc069 differ diff --git a/Library/metadata/4a/4a99bec4a731ff1449a10ff9ccbfc069.info b/Library/metadata/4a/4a99bec4a731ff1449a10ff9ccbfc069.info new file mode 100644 index 0000000..e3a50c0 Binary files /dev/null and b/Library/metadata/4a/4a99bec4a731ff1449a10ff9ccbfc069.info differ diff --git a/Library/metadata/4b/4ba2329b63d54f0187bcaa12486b1b0f b/Library/metadata/4b/4ba2329b63d54f0187bcaa12486b1b0f new file mode 100644 index 0000000..b2b08bc Binary files /dev/null and b/Library/metadata/4b/4ba2329b63d54f0187bcaa12486b1b0f differ diff --git a/Library/metadata/4b/4ba2329b63d54f0187bcaa12486b1b0f.info b/Library/metadata/4b/4ba2329b63d54f0187bcaa12486b1b0f.info new file mode 100644 index 0000000..20ea559 Binary files /dev/null and b/Library/metadata/4b/4ba2329b63d54f0187bcaa12486b1b0f.info differ diff --git a/Library/metadata/4b/4bcf979b872c9794aa698efc6f5e9ea2 b/Library/metadata/4b/4bcf979b872c9794aa698efc6f5e9ea2 new file mode 100644 index 0000000..eadfa29 Binary files /dev/null and b/Library/metadata/4b/4bcf979b872c9794aa698efc6f5e9ea2 differ diff --git a/Library/metadata/4b/4bcf979b872c9794aa698efc6f5e9ea2.info b/Library/metadata/4b/4bcf979b872c9794aa698efc6f5e9ea2.info new file mode 100644 index 0000000..227bdf8 Binary files /dev/null and b/Library/metadata/4b/4bcf979b872c9794aa698efc6f5e9ea2.info differ diff --git a/Library/metadata/51/517af1b5b81b93b43b9745d58f017562 b/Library/metadata/51/517af1b5b81b93b43b9745d58f017562 new file mode 100644 index 0000000..1260ea6 Binary files /dev/null and b/Library/metadata/51/517af1b5b81b93b43b9745d58f017562 differ diff --git a/Library/metadata/51/517af1b5b81b93b43b9745d58f017562.info b/Library/metadata/51/517af1b5b81b93b43b9745d58f017562.info new file mode 100644 index 0000000..b9a37c2 Binary files /dev/null and b/Library/metadata/51/517af1b5b81b93b43b9745d58f017562.info differ diff --git a/Library/metadata/52/52d9c359c39b34257a37eb870d54a6ec b/Library/metadata/52/52d9c359c39b34257a37eb870d54a6ec new file mode 100644 index 0000000..df51aab Binary files /dev/null and b/Library/metadata/52/52d9c359c39b34257a37eb870d54a6ec differ diff --git a/Library/metadata/52/52d9c359c39b34257a37eb870d54a6ec.info b/Library/metadata/52/52d9c359c39b34257a37eb870d54a6ec.info new file mode 100644 index 0000000..5e34ed0 Binary files /dev/null and b/Library/metadata/52/52d9c359c39b34257a37eb870d54a6ec.info differ diff --git a/Library/metadata/53/53ebcfaa2e1e4e2dbc85882cd5a73fa1 b/Library/metadata/53/53ebcfaa2e1e4e2dbc85882cd5a73fa1 new file mode 100644 index 0000000..c8494a0 Binary files /dev/null and b/Library/metadata/53/53ebcfaa2e1e4e2dbc85882cd5a73fa1 differ diff --git a/Library/metadata/53/53ebcfaa2e1e4e2dbc85882cd5a73fa1.info b/Library/metadata/53/53ebcfaa2e1e4e2dbc85882cd5a73fa1.info new file mode 100644 index 0000000..cd53daa Binary files /dev/null and b/Library/metadata/53/53ebcfaa2e1e4e2dbc85882cd5a73fa1.info differ diff --git a/Library/metadata/57/5782f9e9e6e0bb94bac99aeea24814fc b/Library/metadata/57/5782f9e9e6e0bb94bac99aeea24814fc new file mode 100644 index 0000000..406623b Binary files /dev/null and b/Library/metadata/57/5782f9e9e6e0bb94bac99aeea24814fc differ diff --git a/Library/metadata/57/5782f9e9e6e0bb94bac99aeea24814fc.info b/Library/metadata/57/5782f9e9e6e0bb94bac99aeea24814fc.info new file mode 100644 index 0000000..2f38d58 Binary files /dev/null and b/Library/metadata/57/5782f9e9e6e0bb94bac99aeea24814fc.info differ diff --git a/Library/metadata/59/59854773c8b5c4b09b6d81b4de01bfac b/Library/metadata/59/59854773c8b5c4b09b6d81b4de01bfac new file mode 100644 index 0000000..3485527 Binary files /dev/null and b/Library/metadata/59/59854773c8b5c4b09b6d81b4de01bfac differ diff --git a/Library/metadata/59/59854773c8b5c4b09b6d81b4de01bfac.info b/Library/metadata/59/59854773c8b5c4b09b6d81b4de01bfac.info new file mode 100644 index 0000000..f7af067 Binary files /dev/null and b/Library/metadata/59/59854773c8b5c4b09b6d81b4de01bfac.info differ diff --git a/Library/metadata/59/59994f8b883ec4a11979a76de99ee91d b/Library/metadata/59/59994f8b883ec4a11979a76de99ee91d new file mode 100644 index 0000000..a176511 Binary files /dev/null and b/Library/metadata/59/59994f8b883ec4a11979a76de99ee91d differ diff --git a/Library/metadata/59/59994f8b883ec4a11979a76de99ee91d.info b/Library/metadata/59/59994f8b883ec4a11979a76de99ee91d.info new file mode 100644 index 0000000..d3c20b2 Binary files /dev/null and b/Library/metadata/59/59994f8b883ec4a11979a76de99ee91d.info differ diff --git a/Library/metadata/59/59a3b87141335469ea4c765c120d9864 b/Library/metadata/59/59a3b87141335469ea4c765c120d9864 new file mode 100644 index 0000000..f37ef7c Binary files /dev/null and b/Library/metadata/59/59a3b87141335469ea4c765c120d9864 differ diff --git a/Library/metadata/59/59a3b87141335469ea4c765c120d9864.info b/Library/metadata/59/59a3b87141335469ea4c765c120d9864.info new file mode 100644 index 0000000..9dc8e37 Binary files /dev/null and b/Library/metadata/59/59a3b87141335469ea4c765c120d9864.info differ diff --git a/Library/metadata/5c/5c7788dd8cc0a4d48b1fbbbe52819e62 b/Library/metadata/5c/5c7788dd8cc0a4d48b1fbbbe52819e62 new file mode 100644 index 0000000..5d219ce Binary files /dev/null and b/Library/metadata/5c/5c7788dd8cc0a4d48b1fbbbe52819e62 differ diff --git a/Library/metadata/5c/5c7788dd8cc0a4d48b1fbbbe52819e62.info b/Library/metadata/5c/5c7788dd8cc0a4d48b1fbbbe52819e62.info new file mode 100644 index 0000000..09c2dc3 Binary files /dev/null and b/Library/metadata/5c/5c7788dd8cc0a4d48b1fbbbe52819e62.info differ diff --git a/Library/metadata/5c/5c82e4405e11a4de0b3b3619e8f54b78 b/Library/metadata/5c/5c82e4405e11a4de0b3b3619e8f54b78 new file mode 100644 index 0000000..be00596 Binary files /dev/null and b/Library/metadata/5c/5c82e4405e11a4de0b3b3619e8f54b78 differ diff --git a/Library/metadata/5c/5c82e4405e11a4de0b3b3619e8f54b78.info b/Library/metadata/5c/5c82e4405e11a4de0b3b3619e8f54b78.info new file mode 100644 index 0000000..fb691d2 Binary files /dev/null and b/Library/metadata/5c/5c82e4405e11a4de0b3b3619e8f54b78.info differ diff --git a/Library/metadata/5d/5dfad0d5673b24c509f34ce524305475 b/Library/metadata/5d/5dfad0d5673b24c509f34ce524305475 new file mode 100644 index 0000000..8f65e56 Binary files /dev/null and b/Library/metadata/5d/5dfad0d5673b24c509f34ce524305475 differ diff --git a/Library/metadata/5d/5dfad0d5673b24c509f34ce524305475.info b/Library/metadata/5d/5dfad0d5673b24c509f34ce524305475.info new file mode 100644 index 0000000..b7e9557 Binary files /dev/null and b/Library/metadata/5d/5dfad0d5673b24c509f34ce524305475.info differ diff --git a/Library/metadata/5f/5f32cd94baa94578a686d4b9d6b660f7 b/Library/metadata/5f/5f32cd94baa94578a686d4b9d6b660f7 new file mode 100644 index 0000000..d3f8acd Binary files /dev/null and b/Library/metadata/5f/5f32cd94baa94578a686d4b9d6b660f7 differ diff --git a/Library/metadata/5f/5f32cd94baa94578a686d4b9d6b660f7.info b/Library/metadata/5f/5f32cd94baa94578a686d4b9d6b660f7.info new file mode 100644 index 0000000..12bc61d Binary files /dev/null and b/Library/metadata/5f/5f32cd94baa94578a686d4b9d6b660f7.info differ diff --git a/Library/metadata/5f/5f86df318fbb4417da58246c806afd20 b/Library/metadata/5f/5f86df318fbb4417da58246c806afd20 new file mode 100644 index 0000000..0486824 Binary files /dev/null and b/Library/metadata/5f/5f86df318fbb4417da58246c806afd20 differ diff --git a/Library/metadata/5f/5f86df318fbb4417da58246c806afd20.info b/Library/metadata/5f/5f86df318fbb4417da58246c806afd20.info new file mode 100644 index 0000000..0cfca41 Binary files /dev/null and b/Library/metadata/5f/5f86df318fbb4417da58246c806afd20.info differ diff --git a/Library/metadata/66/66543f14af53349fcb76cb3350f95446 b/Library/metadata/66/66543f14af53349fcb76cb3350f95446 new file mode 100644 index 0000000..6d623a4 Binary files /dev/null and b/Library/metadata/66/66543f14af53349fcb76cb3350f95446 differ diff --git a/Library/metadata/66/66543f14af53349fcb76cb3350f95446.info b/Library/metadata/66/66543f14af53349fcb76cb3350f95446.info new file mode 100644 index 0000000..ad34f2f Binary files /dev/null and b/Library/metadata/66/66543f14af53349fcb76cb3350f95446.info differ diff --git a/Library/metadata/67/67d8f23c61ee86e46bbfd6d5bfb90cfd b/Library/metadata/67/67d8f23c61ee86e46bbfd6d5bfb90cfd new file mode 100644 index 0000000..83897d1 Binary files /dev/null and b/Library/metadata/67/67d8f23c61ee86e46bbfd6d5bfb90cfd differ diff --git a/Library/metadata/67/67d8f23c61ee86e46bbfd6d5bfb90cfd.info b/Library/metadata/67/67d8f23c61ee86e46bbfd6d5bfb90cfd.info new file mode 100644 index 0000000..d23066a Binary files /dev/null and b/Library/metadata/67/67d8f23c61ee86e46bbfd6d5bfb90cfd.info differ diff --git a/Library/metadata/69/6981461fe431401459211818212a29cf b/Library/metadata/69/6981461fe431401459211818212a29cf new file mode 100644 index 0000000..49c45ef Binary files /dev/null and b/Library/metadata/69/6981461fe431401459211818212a29cf differ diff --git a/Library/metadata/69/6981461fe431401459211818212a29cf.info b/Library/metadata/69/6981461fe431401459211818212a29cf.info new file mode 100644 index 0000000..bbaad88 Binary files /dev/null and b/Library/metadata/69/6981461fe431401459211818212a29cf.info differ diff --git a/Library/metadata/6c/6cdf1e5c78d14720aaadccd4c792df96 b/Library/metadata/6c/6cdf1e5c78d14720aaadccd4c792df96 new file mode 100644 index 0000000..548eed5 Binary files /dev/null and b/Library/metadata/6c/6cdf1e5c78d14720aaadccd4c792df96 differ diff --git a/Library/metadata/6c/6cdf1e5c78d14720aaadccd4c792df96.info b/Library/metadata/6c/6cdf1e5c78d14720aaadccd4c792df96.info new file mode 100644 index 0000000..836c869 Binary files /dev/null and b/Library/metadata/6c/6cdf1e5c78d14720aaadccd4c792df96.info differ diff --git a/Library/metadata/6d/6d07a24efc2074ecc896d836f89bf80f b/Library/metadata/6d/6d07a24efc2074ecc896d836f89bf80f new file mode 100644 index 0000000..a689bb3 Binary files /dev/null and b/Library/metadata/6d/6d07a24efc2074ecc896d836f89bf80f differ diff --git a/Library/metadata/6d/6d07a24efc2074ecc896d836f89bf80f.info b/Library/metadata/6d/6d07a24efc2074ecc896d836f89bf80f.info new file mode 100644 index 0000000..8c0184f Binary files /dev/null and b/Library/metadata/6d/6d07a24efc2074ecc896d836f89bf80f.info differ diff --git a/Library/metadata/73/739bbd9f364b4268874f9fd86ab3beef b/Library/metadata/73/739bbd9f364b4268874f9fd86ab3beef new file mode 100644 index 0000000..22d7f46 Binary files /dev/null and b/Library/metadata/73/739bbd9f364b4268874f9fd86ab3beef differ diff --git a/Library/metadata/73/739bbd9f364b4268874f9fd86ab3beef.info b/Library/metadata/73/739bbd9f364b4268874f9fd86ab3beef.info new file mode 100644 index 0000000..74e70e4 Binary files /dev/null and b/Library/metadata/73/739bbd9f364b4268874f9fd86ab3beef.info differ diff --git a/Library/metadata/76/76ac98d8852f2468f84827eb78064f63 b/Library/metadata/76/76ac98d8852f2468f84827eb78064f63 new file mode 100644 index 0000000..95e3e27 Binary files /dev/null and b/Library/metadata/76/76ac98d8852f2468f84827eb78064f63 differ diff --git a/Library/metadata/76/76ac98d8852f2468f84827eb78064f63.info b/Library/metadata/76/76ac98d8852f2468f84827eb78064f63.info new file mode 100644 index 0000000..f5c3b48 Binary files /dev/null and b/Library/metadata/76/76ac98d8852f2468f84827eb78064f63.info differ diff --git a/Library/metadata/77/771fed578d8ae44268526b686e9cbbad b/Library/metadata/77/771fed578d8ae44268526b686e9cbbad new file mode 100644 index 0000000..6c04c2f Binary files /dev/null and b/Library/metadata/77/771fed578d8ae44268526b686e9cbbad differ diff --git a/Library/metadata/77/771fed578d8ae44268526b686e9cbbad.info b/Library/metadata/77/771fed578d8ae44268526b686e9cbbad.info new file mode 100644 index 0000000..9718bdd Binary files /dev/null and b/Library/metadata/77/771fed578d8ae44268526b686e9cbbad.info differ diff --git a/Library/metadata/78/78bb60b6b3f674c478263e48284d53f2 b/Library/metadata/78/78bb60b6b3f674c478263e48284d53f2 new file mode 100644 index 0000000..250c97f Binary files /dev/null and b/Library/metadata/78/78bb60b6b3f674c478263e48284d53f2 differ diff --git a/Library/metadata/78/78bb60b6b3f674c478263e48284d53f2.info b/Library/metadata/78/78bb60b6b3f674c478263e48284d53f2.info new file mode 100644 index 0000000..33f6e3d Binary files /dev/null and b/Library/metadata/78/78bb60b6b3f674c478263e48284d53f2.info differ diff --git a/Library/metadata/7c/7c5931849d30c4d96aaf46630b808248 b/Library/metadata/7c/7c5931849d30c4d96aaf46630b808248 new file mode 100644 index 0000000..65d033a Binary files /dev/null and b/Library/metadata/7c/7c5931849d30c4d96aaf46630b808248 differ diff --git a/Library/metadata/7c/7c5931849d30c4d96aaf46630b808248.info b/Library/metadata/7c/7c5931849d30c4d96aaf46630b808248.info new file mode 100644 index 0000000..7050537 Binary files /dev/null and b/Library/metadata/7c/7c5931849d30c4d96aaf46630b808248.info differ diff --git a/Library/metadata/7c/7cbab2be89b54486bbd23a6fe637d30e b/Library/metadata/7c/7cbab2be89b54486bbd23a6fe637d30e new file mode 100644 index 0000000..70951ef Binary files /dev/null and b/Library/metadata/7c/7cbab2be89b54486bbd23a6fe637d30e differ diff --git a/Library/metadata/7c/7cbab2be89b54486bbd23a6fe637d30e.info b/Library/metadata/7c/7cbab2be89b54486bbd23a6fe637d30e.info new file mode 100644 index 0000000..2ad4725 Binary files /dev/null and b/Library/metadata/7c/7cbab2be89b54486bbd23a6fe637d30e.info differ diff --git a/Library/metadata/80/80a3616ca19596e4da0f10f14d241e9f b/Library/metadata/80/80a3616ca19596e4da0f10f14d241e9f new file mode 100644 index 0000000..0718cba Binary files /dev/null and b/Library/metadata/80/80a3616ca19596e4da0f10f14d241e9f differ diff --git a/Library/metadata/80/80a3616ca19596e4da0f10f14d241e9f.info b/Library/metadata/80/80a3616ca19596e4da0f10f14d241e9f.info new file mode 100644 index 0000000..beedd87 Binary files /dev/null and b/Library/metadata/80/80a3616ca19596e4da0f10f14d241e9f.info differ diff --git a/Library/metadata/83/83e0ace11205c3e4ea5f51e714f1cd83 b/Library/metadata/83/83e0ace11205c3e4ea5f51e714f1cd83 new file mode 100644 index 0000000..a20865c Binary files /dev/null and b/Library/metadata/83/83e0ace11205c3e4ea5f51e714f1cd83 differ diff --git a/Library/metadata/83/83e0ace11205c3e4ea5f51e714f1cd83.info b/Library/metadata/83/83e0ace11205c3e4ea5f51e714f1cd83.info new file mode 100644 index 0000000..e105ce1 Binary files /dev/null and b/Library/metadata/83/83e0ace11205c3e4ea5f51e714f1cd83.info differ diff --git a/Library/metadata/84/84ca94c19f25ae14d83aa41bb3654390 b/Library/metadata/84/84ca94c19f25ae14d83aa41bb3654390 new file mode 100644 index 0000000..085b15e Binary files /dev/null and b/Library/metadata/84/84ca94c19f25ae14d83aa41bb3654390 differ diff --git a/Library/metadata/84/84ca94c19f25ae14d83aa41bb3654390.info b/Library/metadata/84/84ca94c19f25ae14d83aa41bb3654390.info new file mode 100644 index 0000000..fe21083 Binary files /dev/null and b/Library/metadata/84/84ca94c19f25ae14d83aa41bb3654390.info differ diff --git a/Library/metadata/85/852e56802eb941638acbb491814497b0 b/Library/metadata/85/852e56802eb941638acbb491814497b0 new file mode 100644 index 0000000..bd48936 Binary files /dev/null and b/Library/metadata/85/852e56802eb941638acbb491814497b0 differ diff --git a/Library/metadata/85/852e56802eb941638acbb491814497b0.info b/Library/metadata/85/852e56802eb941638acbb491814497b0.info new file mode 100644 index 0000000..8c4d6a6 Binary files /dev/null and b/Library/metadata/85/852e56802eb941638acbb491814497b0.info differ diff --git a/Library/metadata/86/86f4de9468454445ac2f39e207fafa3a b/Library/metadata/86/86f4de9468454445ac2f39e207fafa3a new file mode 100644 index 0000000..3d0d59e Binary files /dev/null and b/Library/metadata/86/86f4de9468454445ac2f39e207fafa3a differ diff --git a/Library/metadata/86/86f4de9468454445ac2f39e207fafa3a.info b/Library/metadata/86/86f4de9468454445ac2f39e207fafa3a.info new file mode 100644 index 0000000..4f4fbea Binary files /dev/null and b/Library/metadata/86/86f4de9468454445ac2f39e207fafa3a.info differ diff --git a/Library/metadata/87/870353891bb340e2b2a9c8707e7419ba b/Library/metadata/87/870353891bb340e2b2a9c8707e7419ba new file mode 100644 index 0000000..ed88c32 Binary files /dev/null and b/Library/metadata/87/870353891bb340e2b2a9c8707e7419ba differ diff --git a/Library/metadata/87/870353891bb340e2b2a9c8707e7419ba.info b/Library/metadata/87/870353891bb340e2b2a9c8707e7419ba.info new file mode 100644 index 0000000..a35de2a Binary files /dev/null and b/Library/metadata/87/870353891bb340e2b2a9c8707e7419ba.info differ diff --git a/Library/metadata/87/875e80c6623a0f24ba6213d19d06de1d b/Library/metadata/87/875e80c6623a0f24ba6213d19d06de1d new file mode 100644 index 0000000..bbed627 Binary files /dev/null and b/Library/metadata/87/875e80c6623a0f24ba6213d19d06de1d differ diff --git a/Library/metadata/87/875e80c6623a0f24ba6213d19d06de1d.info b/Library/metadata/87/875e80c6623a0f24ba6213d19d06de1d.info new file mode 100644 index 0000000..406e76c Binary files /dev/null and b/Library/metadata/87/875e80c6623a0f24ba6213d19d06de1d.info differ diff --git a/Library/metadata/88/8831de039f103da418292c9ad39cf073 b/Library/metadata/88/8831de039f103da418292c9ad39cf073 new file mode 100644 index 0000000..49a3559 Binary files /dev/null and b/Library/metadata/88/8831de039f103da418292c9ad39cf073 differ diff --git a/Library/metadata/88/8831de039f103da418292c9ad39cf073.info b/Library/metadata/88/8831de039f103da418292c9ad39cf073.info new file mode 100644 index 0000000..8a5a143 Binary files /dev/null and b/Library/metadata/88/8831de039f103da418292c9ad39cf073.info differ diff --git a/Library/metadata/89/89d19a4bdf5eb4434bad298539068977 b/Library/metadata/89/89d19a4bdf5eb4434bad298539068977 new file mode 100644 index 0000000..aa21594 Binary files /dev/null and b/Library/metadata/89/89d19a4bdf5eb4434bad298539068977 differ diff --git a/Library/metadata/89/89d19a4bdf5eb4434bad298539068977.info b/Library/metadata/89/89d19a4bdf5eb4434bad298539068977.info new file mode 100644 index 0000000..e52ff0d Binary files /dev/null and b/Library/metadata/89/89d19a4bdf5eb4434bad298539068977.info differ diff --git a/Library/metadata/8a/8a686a8ed5bb442c09e5c6787b6bb0f3 b/Library/metadata/8a/8a686a8ed5bb442c09e5c6787b6bb0f3 new file mode 100644 index 0000000..97a4544 Binary files /dev/null and b/Library/metadata/8a/8a686a8ed5bb442c09e5c6787b6bb0f3 differ diff --git a/Library/metadata/8a/8a686a8ed5bb442c09e5c6787b6bb0f3.info b/Library/metadata/8a/8a686a8ed5bb442c09e5c6787b6bb0f3.info new file mode 100644 index 0000000..2bf837b Binary files /dev/null and b/Library/metadata/8a/8a686a8ed5bb442c09e5c6787b6bb0f3.info differ diff --git a/Library/metadata/8d/8d2b24bfce430485fabda1fa111cf4bf b/Library/metadata/8d/8d2b24bfce430485fabda1fa111cf4bf new file mode 100644 index 0000000..05b88d2 Binary files /dev/null and b/Library/metadata/8d/8d2b24bfce430485fabda1fa111cf4bf differ diff --git a/Library/metadata/8d/8d2b24bfce430485fabda1fa111cf4bf.info b/Library/metadata/8d/8d2b24bfce430485fabda1fa111cf4bf.info new file mode 100644 index 0000000..78b560f Binary files /dev/null and b/Library/metadata/8d/8d2b24bfce430485fabda1fa111cf4bf.info differ diff --git a/Library/metadata/8e/8e0cd8ed44d4412cbe0642067abc9e44 b/Library/metadata/8e/8e0cd8ed44d4412cbe0642067abc9e44 new file mode 100644 index 0000000..81b404a Binary files /dev/null and b/Library/metadata/8e/8e0cd8ed44d4412cbe0642067abc9e44 differ diff --git a/Library/metadata/8e/8e0cd8ed44d4412cbe0642067abc9e44.info b/Library/metadata/8e/8e0cd8ed44d4412cbe0642067abc9e44.info new file mode 100644 index 0000000..074026e Binary files /dev/null and b/Library/metadata/8e/8e0cd8ed44d4412cbe0642067abc9e44.info differ diff --git a/Library/metadata/8e/8e7066e382b0fc749b25dbb1a3004dfe b/Library/metadata/8e/8e7066e382b0fc749b25dbb1a3004dfe new file mode 100644 index 0000000..2432954 Binary files /dev/null and b/Library/metadata/8e/8e7066e382b0fc749b25dbb1a3004dfe differ diff --git a/Library/metadata/8e/8e7066e382b0fc749b25dbb1a3004dfe.info b/Library/metadata/8e/8e7066e382b0fc749b25dbb1a3004dfe.info new file mode 100644 index 0000000..4a69639 Binary files /dev/null and b/Library/metadata/8e/8e7066e382b0fc749b25dbb1a3004dfe.info differ diff --git a/Library/metadata/8e/8ef2eb595f1b7ee47b9656de59bd7185 b/Library/metadata/8e/8ef2eb595f1b7ee47b9656de59bd7185 new file mode 100644 index 0000000..85d49f0 Binary files /dev/null and b/Library/metadata/8e/8ef2eb595f1b7ee47b9656de59bd7185 differ diff --git a/Library/metadata/8e/8ef2eb595f1b7ee47b9656de59bd7185.info b/Library/metadata/8e/8ef2eb595f1b7ee47b9656de59bd7185.info new file mode 100644 index 0000000..bab7b62 Binary files /dev/null and b/Library/metadata/8e/8ef2eb595f1b7ee47b9656de59bd7185.info differ diff --git a/Library/metadata/92/921bd605a9966413cb772fb192226a5f b/Library/metadata/92/921bd605a9966413cb772fb192226a5f new file mode 100644 index 0000000..9031b3e Binary files /dev/null and b/Library/metadata/92/921bd605a9966413cb772fb192226a5f differ diff --git a/Library/metadata/92/921bd605a9966413cb772fb192226a5f.info b/Library/metadata/92/921bd605a9966413cb772fb192226a5f.info new file mode 100644 index 0000000..8eba432 Binary files /dev/null and b/Library/metadata/92/921bd605a9966413cb772fb192226a5f.info differ diff --git a/Library/metadata/95/95f0e4f37c4344f6f8b20ce7d2bce74d b/Library/metadata/95/95f0e4f37c4344f6f8b20ce7d2bce74d new file mode 100644 index 0000000..0334136 Binary files /dev/null and b/Library/metadata/95/95f0e4f37c4344f6f8b20ce7d2bce74d differ diff --git a/Library/metadata/95/95f0e4f37c4344f6f8b20ce7d2bce74d.info b/Library/metadata/95/95f0e4f37c4344f6f8b20ce7d2bce74d.info new file mode 100644 index 0000000..69cf15b Binary files /dev/null and b/Library/metadata/95/95f0e4f37c4344f6f8b20ce7d2bce74d.info differ diff --git a/Library/metadata/97/97decbdab0634cdd991f8d23ddf0dead b/Library/metadata/97/97decbdab0634cdd991f8d23ddf0dead new file mode 100644 index 0000000..ce36055 Binary files /dev/null and b/Library/metadata/97/97decbdab0634cdd991f8d23ddf0dead differ diff --git a/Library/metadata/97/97decbdab0634cdd991f8d23ddf0dead.info b/Library/metadata/97/97decbdab0634cdd991f8d23ddf0dead.info new file mode 100644 index 0000000..fc19d4e Binary files /dev/null and b/Library/metadata/97/97decbdab0634cdd991f8d23ddf0dead.info differ diff --git a/Library/metadata/97/97ed2e717bf2f4577b912ee1069bb0cd b/Library/metadata/97/97ed2e717bf2f4577b912ee1069bb0cd new file mode 100644 index 0000000..098dc7f Binary files /dev/null and b/Library/metadata/97/97ed2e717bf2f4577b912ee1069bb0cd differ diff --git a/Library/metadata/97/97ed2e717bf2f4577b912ee1069bb0cd.info b/Library/metadata/97/97ed2e717bf2f4577b912ee1069bb0cd.info new file mode 100644 index 0000000..f214c61 Binary files /dev/null and b/Library/metadata/97/97ed2e717bf2f4577b912ee1069bb0cd.info differ diff --git a/Library/metadata/98/9897b56a6a80044638c6d2122814f2c3 b/Library/metadata/98/9897b56a6a80044638c6d2122814f2c3 new file mode 100644 index 0000000..176ecda Binary files /dev/null and b/Library/metadata/98/9897b56a6a80044638c6d2122814f2c3 differ diff --git a/Library/metadata/98/9897b56a6a80044638c6d2122814f2c3.info b/Library/metadata/98/9897b56a6a80044638c6d2122814f2c3.info new file mode 100644 index 0000000..baaf41a Binary files /dev/null and b/Library/metadata/98/9897b56a6a80044638c6d2122814f2c3.info differ diff --git a/Library/metadata/98/98e2163698feb48ab96e7ab4710f9bb3 b/Library/metadata/98/98e2163698feb48ab96e7ab4710f9bb3 new file mode 100644 index 0000000..ece5e36 Binary files /dev/null and b/Library/metadata/98/98e2163698feb48ab96e7ab4710f9bb3 differ diff --git a/Library/metadata/98/98e2163698feb48ab96e7ab4710f9bb3.info b/Library/metadata/98/98e2163698feb48ab96e7ab4710f9bb3.info new file mode 100644 index 0000000..d9aa124 Binary files /dev/null and b/Library/metadata/98/98e2163698feb48ab96e7ab4710f9bb3.info differ diff --git a/Library/metadata/9b/9bb541a7bf4d841a8a655dc685b730bc b/Library/metadata/9b/9bb541a7bf4d841a8a655dc685b730bc new file mode 100644 index 0000000..cdb53ca Binary files /dev/null and b/Library/metadata/9b/9bb541a7bf4d841a8a655dc685b730bc differ diff --git a/Library/metadata/9b/9bb541a7bf4d841a8a655dc685b730bc.info b/Library/metadata/9b/9bb541a7bf4d841a8a655dc685b730bc.info new file mode 100644 index 0000000..602c4db Binary files /dev/null and b/Library/metadata/9b/9bb541a7bf4d841a8a655dc685b730bc.info differ diff --git a/Library/metadata/9d/9d9e982c35579134899d609194eb470e b/Library/metadata/9d/9d9e982c35579134899d609194eb470e new file mode 100644 index 0000000..ee2a0d2 Binary files /dev/null and b/Library/metadata/9d/9d9e982c35579134899d609194eb470e differ diff --git a/Library/metadata/9d/9d9e982c35579134899d609194eb470e.info b/Library/metadata/9d/9d9e982c35579134899d609194eb470e.info new file mode 100644 index 0000000..a14cac4 Binary files /dev/null and b/Library/metadata/9d/9d9e982c35579134899d609194eb470e.info differ diff --git a/Library/metadata/9e/9ee13663c71464ae7bf78c54e586e020 b/Library/metadata/9e/9ee13663c71464ae7bf78c54e586e020 new file mode 100644 index 0000000..0a757ec Binary files /dev/null and b/Library/metadata/9e/9ee13663c71464ae7bf78c54e586e020 differ diff --git a/Library/metadata/9e/9ee13663c71464ae7bf78c54e586e020.info b/Library/metadata/9e/9ee13663c71464ae7bf78c54e586e020.info new file mode 100644 index 0000000..468c51a Binary files /dev/null and b/Library/metadata/9e/9ee13663c71464ae7bf78c54e586e020.info differ diff --git a/Library/metadata/a2/a2fadd96e71d04da1849fa0f42d60409 b/Library/metadata/a2/a2fadd96e71d04da1849fa0f42d60409 new file mode 100644 index 0000000..69dfa2a Binary files /dev/null and b/Library/metadata/a2/a2fadd96e71d04da1849fa0f42d60409 differ diff --git a/Library/metadata/a2/a2fadd96e71d04da1849fa0f42d60409.info b/Library/metadata/a2/a2fadd96e71d04da1849fa0f42d60409.info new file mode 100644 index 0000000..8e88576 Binary files /dev/null and b/Library/metadata/a2/a2fadd96e71d04da1849fa0f42d60409.info differ diff --git a/Library/metadata/a3/a34c9bc6981e049c19f4da8fe1902c00 b/Library/metadata/a3/a34c9bc6981e049c19f4da8fe1902c00 new file mode 100644 index 0000000..f489f74 Binary files /dev/null and b/Library/metadata/a3/a34c9bc6981e049c19f4da8fe1902c00 differ diff --git a/Library/metadata/a3/a34c9bc6981e049c19f4da8fe1902c00.info b/Library/metadata/a3/a34c9bc6981e049c19f4da8fe1902c00.info new file mode 100644 index 0000000..c69e2b4 Binary files /dev/null and b/Library/metadata/a3/a34c9bc6981e049c19f4da8fe1902c00.info differ diff --git a/Library/metadata/a6/a62b0fb2ea0b94bb5a6988fb0eddb88e b/Library/metadata/a6/a62b0fb2ea0b94bb5a6988fb0eddb88e new file mode 100644 index 0000000..89f784a Binary files /dev/null and b/Library/metadata/a6/a62b0fb2ea0b94bb5a6988fb0eddb88e differ diff --git a/Library/metadata/a6/a62b0fb2ea0b94bb5a6988fb0eddb88e.info b/Library/metadata/a6/a62b0fb2ea0b94bb5a6988fb0eddb88e.info new file mode 100644 index 0000000..7845737 Binary files /dev/null and b/Library/metadata/a6/a62b0fb2ea0b94bb5a6988fb0eddb88e.info differ diff --git a/Library/metadata/a8/a8fff38cff8274a0483d4c2e820734c6 b/Library/metadata/a8/a8fff38cff8274a0483d4c2e820734c6 new file mode 100644 index 0000000..c4aa478 Binary files /dev/null and b/Library/metadata/a8/a8fff38cff8274a0483d4c2e820734c6 differ diff --git a/Library/metadata/a8/a8fff38cff8274a0483d4c2e820734c6.info b/Library/metadata/a8/a8fff38cff8274a0483d4c2e820734c6.info new file mode 100644 index 0000000..63d9167 Binary files /dev/null and b/Library/metadata/a8/a8fff38cff8274a0483d4c2e820734c6.info differ diff --git a/Library/metadata/aa/aa4dea7443d44a74099d453537911940 b/Library/metadata/aa/aa4dea7443d44a74099d453537911940 new file mode 100644 index 0000000..db8bc7b Binary files /dev/null and b/Library/metadata/aa/aa4dea7443d44a74099d453537911940 differ diff --git a/Library/metadata/aa/aa4dea7443d44a74099d453537911940.info b/Library/metadata/aa/aa4dea7443d44a74099d453537911940.info new file mode 100644 index 0000000..f871ae0 Binary files /dev/null and b/Library/metadata/aa/aa4dea7443d44a74099d453537911940.info differ diff --git a/Library/metadata/ab/ab27b401088f749ababd23602d6a403f b/Library/metadata/ab/ab27b401088f749ababd23602d6a403f new file mode 100644 index 0000000..41f45e0 Binary files /dev/null and b/Library/metadata/ab/ab27b401088f749ababd23602d6a403f differ diff --git a/Library/metadata/ab/ab27b401088f749ababd23602d6a403f.info b/Library/metadata/ab/ab27b401088f749ababd23602d6a403f.info new file mode 100644 index 0000000..d20da3c Binary files /dev/null and b/Library/metadata/ab/ab27b401088f749ababd23602d6a403f.info differ diff --git a/Library/metadata/ab/abdf1ea72af3a404f8f345fede963cc0 b/Library/metadata/ab/abdf1ea72af3a404f8f345fede963cc0 new file mode 100644 index 0000000..476d1c7 Binary files /dev/null and b/Library/metadata/ab/abdf1ea72af3a404f8f345fede963cc0 differ diff --git a/Library/metadata/ab/abdf1ea72af3a404f8f345fede963cc0.info b/Library/metadata/ab/abdf1ea72af3a404f8f345fede963cc0.info new file mode 100644 index 0000000..6bb8aaa Binary files /dev/null and b/Library/metadata/ab/abdf1ea72af3a404f8f345fede963cc0.info differ diff --git a/Library/metadata/ad/adebbd281f1a4ef3a30be7f21937e02f b/Library/metadata/ad/adebbd281f1a4ef3a30be7f21937e02f new file mode 100644 index 0000000..73d9638 Binary files /dev/null and b/Library/metadata/ad/adebbd281f1a4ef3a30be7f21937e02f differ diff --git a/Library/metadata/ad/adebbd281f1a4ef3a30be7f21937e02f.info b/Library/metadata/ad/adebbd281f1a4ef3a30be7f21937e02f.info new file mode 100644 index 0000000..c70deee Binary files /dev/null and b/Library/metadata/ad/adebbd281f1a4ef3a30be7f21937e02f.info differ diff --git a/Library/metadata/b2/b2bead50dbf86924f8e51f03ddbebf70 b/Library/metadata/b2/b2bead50dbf86924f8e51f03ddbebf70 new file mode 100644 index 0000000..0a04429 Binary files /dev/null and b/Library/metadata/b2/b2bead50dbf86924f8e51f03ddbebf70 differ diff --git a/Library/metadata/b2/b2bead50dbf86924f8e51f03ddbebf70.info b/Library/metadata/b2/b2bead50dbf86924f8e51f03ddbebf70.info new file mode 100644 index 0000000..004c758 Binary files /dev/null and b/Library/metadata/b2/b2bead50dbf86924f8e51f03ddbebf70.info differ diff --git a/Library/metadata/b5/b50d9a19ad91a4e51ae1bebb0dcc1e01 b/Library/metadata/b5/b50d9a19ad91a4e51ae1bebb0dcc1e01 new file mode 100644 index 0000000..bdc76ec Binary files /dev/null and b/Library/metadata/b5/b50d9a19ad91a4e51ae1bebb0dcc1e01 differ diff --git a/Library/metadata/b5/b50d9a19ad91a4e51ae1bebb0dcc1e01.info b/Library/metadata/b5/b50d9a19ad91a4e51ae1bebb0dcc1e01.info new file mode 100644 index 0000000..dc16680 Binary files /dev/null and b/Library/metadata/b5/b50d9a19ad91a4e51ae1bebb0dcc1e01.info differ diff --git a/Library/metadata/b6/b629f60444f4a4742bc16852f5ea3a55 b/Library/metadata/b6/b629f60444f4a4742bc16852f5ea3a55 new file mode 100644 index 0000000..7574d1a Binary files /dev/null and b/Library/metadata/b6/b629f60444f4a4742bc16852f5ea3a55 differ diff --git a/Library/metadata/b6/b629f60444f4a4742bc16852f5ea3a55.info b/Library/metadata/b6/b629f60444f4a4742bc16852f5ea3a55.info new file mode 100644 index 0000000..d8888c8 Binary files /dev/null and b/Library/metadata/b6/b629f60444f4a4742bc16852f5ea3a55.info differ diff --git a/Library/metadata/ba/ba0a8f18140d92f4bae65e9c65a8d603 b/Library/metadata/ba/ba0a8f18140d92f4bae65e9c65a8d603 new file mode 100644 index 0000000..c715012 Binary files /dev/null and b/Library/metadata/ba/ba0a8f18140d92f4bae65e9c65a8d603 differ diff --git a/Library/metadata/ba/ba0a8f18140d92f4bae65e9c65a8d603.info b/Library/metadata/ba/ba0a8f18140d92f4bae65e9c65a8d603.info new file mode 100644 index 0000000..6396e92 Binary files /dev/null and b/Library/metadata/ba/ba0a8f18140d92f4bae65e9c65a8d603.info differ diff --git a/Library/metadata/bc/bc9a55c1f5dca214eb7a0845496e09be b/Library/metadata/bc/bc9a55c1f5dca214eb7a0845496e09be new file mode 100644 index 0000000..fa4c45d Binary files /dev/null and b/Library/metadata/bc/bc9a55c1f5dca214eb7a0845496e09be differ diff --git a/Library/metadata/bc/bc9a55c1f5dca214eb7a0845496e09be.info b/Library/metadata/bc/bc9a55c1f5dca214eb7a0845496e09be.info new file mode 100644 index 0000000..f9e03c0 Binary files /dev/null and b/Library/metadata/bc/bc9a55c1f5dca214eb7a0845496e09be.info differ diff --git a/Library/metadata/c2/c23cb74276760459d8989bea598b74b6 b/Library/metadata/c2/c23cb74276760459d8989bea598b74b6 new file mode 100644 index 0000000..f158e69 Binary files /dev/null and b/Library/metadata/c2/c23cb74276760459d8989bea598b74b6 differ diff --git a/Library/metadata/c2/c23cb74276760459d8989bea598b74b6.info b/Library/metadata/c2/c23cb74276760459d8989bea598b74b6.info new file mode 100644 index 0000000..ad2cc6a Binary files /dev/null and b/Library/metadata/c2/c23cb74276760459d8989bea598b74b6.info differ diff --git a/Library/metadata/c5/c589e228a3db54ba7830738331a921c0 b/Library/metadata/c5/c589e228a3db54ba7830738331a921c0 new file mode 100644 index 0000000..7be67cf Binary files /dev/null and b/Library/metadata/c5/c589e228a3db54ba7830738331a921c0 differ diff --git a/Library/metadata/c5/c589e228a3db54ba7830738331a921c0.info b/Library/metadata/c5/c589e228a3db54ba7830738331a921c0.info new file mode 100644 index 0000000..1c1d1b6 Binary files /dev/null and b/Library/metadata/c5/c589e228a3db54ba7830738331a921c0.info differ diff --git a/Library/metadata/c7/c70183e0256ad48b292db3bb58f5eaf7 b/Library/metadata/c7/c70183e0256ad48b292db3bb58f5eaf7 new file mode 100644 index 0000000..7e49ad8 Binary files /dev/null and b/Library/metadata/c7/c70183e0256ad48b292db3bb58f5eaf7 differ diff --git a/Library/metadata/c7/c70183e0256ad48b292db3bb58f5eaf7.info b/Library/metadata/c7/c70183e0256ad48b292db3bb58f5eaf7.info new file mode 100644 index 0000000..bff2483 Binary files /dev/null and b/Library/metadata/c7/c70183e0256ad48b292db3bb58f5eaf7.info differ diff --git a/Library/metadata/c7/c7aba8eac7c3b43d68a664e6a5292a22 b/Library/metadata/c7/c7aba8eac7c3b43d68a664e6a5292a22 new file mode 100644 index 0000000..220c379 Binary files /dev/null and b/Library/metadata/c7/c7aba8eac7c3b43d68a664e6a5292a22 differ diff --git a/Library/metadata/c7/c7aba8eac7c3b43d68a664e6a5292a22.info b/Library/metadata/c7/c7aba8eac7c3b43d68a664e6a5292a22.info new file mode 100644 index 0000000..4eade81 Binary files /dev/null and b/Library/metadata/c7/c7aba8eac7c3b43d68a664e6a5292a22.info differ diff --git a/Library/metadata/cb/cba314b274dd847aa9449341067113ed b/Library/metadata/cb/cba314b274dd847aa9449341067113ed new file mode 100644 index 0000000..ab6bef4 Binary files /dev/null and b/Library/metadata/cb/cba314b274dd847aa9449341067113ed differ diff --git a/Library/metadata/cb/cba314b274dd847aa9449341067113ed.info b/Library/metadata/cb/cba314b274dd847aa9449341067113ed.info new file mode 100644 index 0000000..34c91aa Binary files /dev/null and b/Library/metadata/cb/cba314b274dd847aa9449341067113ed.info differ diff --git a/Library/metadata/cd/cdaa54b947d9546e3bc45d706993c55c b/Library/metadata/cd/cdaa54b947d9546e3bc45d706993c55c new file mode 100644 index 0000000..ceb6adb Binary files /dev/null and b/Library/metadata/cd/cdaa54b947d9546e3bc45d706993c55c differ diff --git a/Library/metadata/cd/cdaa54b947d9546e3bc45d706993c55c.info b/Library/metadata/cd/cdaa54b947d9546e3bc45d706993c55c.info new file mode 100644 index 0000000..09353a1 Binary files /dev/null and b/Library/metadata/cd/cdaa54b947d9546e3bc45d706993c55c.info differ diff --git a/Library/metadata/ce/cec95b24fc91f4731a8831f27afc37fb b/Library/metadata/ce/cec95b24fc91f4731a8831f27afc37fb new file mode 100644 index 0000000..1d1aa2b Binary files /dev/null and b/Library/metadata/ce/cec95b24fc91f4731a8831f27afc37fb differ diff --git a/Library/metadata/ce/cec95b24fc91f4731a8831f27afc37fb.info b/Library/metadata/ce/cec95b24fc91f4731a8831f27afc37fb.info new file mode 100644 index 0000000..f530647 Binary files /dev/null and b/Library/metadata/ce/cec95b24fc91f4731a8831f27afc37fb.info differ diff --git a/Library/metadata/cf/cf34fb6581ab3477ca52c7281c100eb1 b/Library/metadata/cf/cf34fb6581ab3477ca52c7281c100eb1 new file mode 100644 index 0000000..abb426c Binary files /dev/null and b/Library/metadata/cf/cf34fb6581ab3477ca52c7281c100eb1 differ diff --git a/Library/metadata/cf/cf34fb6581ab3477ca52c7281c100eb1.info b/Library/metadata/cf/cf34fb6581ab3477ca52c7281c100eb1.info new file mode 100644 index 0000000..9de804d Binary files /dev/null and b/Library/metadata/cf/cf34fb6581ab3477ca52c7281c100eb1.info differ diff --git a/Library/metadata/d0/d05b96cee66e14240838de167097537a b/Library/metadata/d0/d05b96cee66e14240838de167097537a new file mode 100644 index 0000000..709e48f Binary files /dev/null and b/Library/metadata/d0/d05b96cee66e14240838de167097537a differ diff --git a/Library/metadata/d0/d05b96cee66e14240838de167097537a.info b/Library/metadata/d0/d05b96cee66e14240838de167097537a.info new file mode 100644 index 0000000..91382f3 Binary files /dev/null and b/Library/metadata/d0/d05b96cee66e14240838de167097537a.info differ diff --git a/Library/metadata/d0/d0f3cc70acc524d6ea3d5bccab3165a1 b/Library/metadata/d0/d0f3cc70acc524d6ea3d5bccab3165a1 new file mode 100644 index 0000000..6cfd299 Binary files /dev/null and b/Library/metadata/d0/d0f3cc70acc524d6ea3d5bccab3165a1 differ diff --git a/Library/metadata/d0/d0f3cc70acc524d6ea3d5bccab3165a1.info b/Library/metadata/d0/d0f3cc70acc524d6ea3d5bccab3165a1.info new file mode 100644 index 0000000..121dcb8 Binary files /dev/null and b/Library/metadata/d0/d0f3cc70acc524d6ea3d5bccab3165a1.info differ diff --git a/Library/metadata/d9/d909adc49654547af9ca6eae2e069b98 b/Library/metadata/d9/d909adc49654547af9ca6eae2e069b98 new file mode 100644 index 0000000..e6c66d4 Binary files /dev/null and b/Library/metadata/d9/d909adc49654547af9ca6eae2e069b98 differ diff --git a/Library/metadata/d9/d909adc49654547af9ca6eae2e069b98.info b/Library/metadata/d9/d909adc49654547af9ca6eae2e069b98.info new file mode 100644 index 0000000..5d4f5a9 Binary files /dev/null and b/Library/metadata/d9/d909adc49654547af9ca6eae2e069b98.info differ diff --git a/Library/metadata/d9/d91035c548f23744c9bfb107348ed1c0 b/Library/metadata/d9/d91035c548f23744c9bfb107348ed1c0 new file mode 100644 index 0000000..3b07db7 Binary files /dev/null and b/Library/metadata/d9/d91035c548f23744c9bfb107348ed1c0 differ diff --git a/Library/metadata/d9/d91035c548f23744c9bfb107348ed1c0.info b/Library/metadata/d9/d91035c548f23744c9bfb107348ed1c0.info new file mode 100644 index 0000000..f476560 Binary files /dev/null and b/Library/metadata/d9/d91035c548f23744c9bfb107348ed1c0.info differ diff --git a/Library/metadata/da/da59f1e0a0d7b4890900540dc557867e b/Library/metadata/da/da59f1e0a0d7b4890900540dc557867e new file mode 100644 index 0000000..3e5f6a1 Binary files /dev/null and b/Library/metadata/da/da59f1e0a0d7b4890900540dc557867e differ diff --git a/Library/metadata/da/da59f1e0a0d7b4890900540dc557867e.info b/Library/metadata/da/da59f1e0a0d7b4890900540dc557867e.info new file mode 100644 index 0000000..d457854 Binary files /dev/null and b/Library/metadata/da/da59f1e0a0d7b4890900540dc557867e.info differ diff --git a/Library/metadata/db/db713b3fbff3647e1a78f8d55cd305ea b/Library/metadata/db/db713b3fbff3647e1a78f8d55cd305ea new file mode 100644 index 0000000..6fbc316 Binary files /dev/null and b/Library/metadata/db/db713b3fbff3647e1a78f8d55cd305ea differ diff --git a/Library/metadata/db/db713b3fbff3647e1a78f8d55cd305ea.info b/Library/metadata/db/db713b3fbff3647e1a78f8d55cd305ea.info new file mode 100644 index 0000000..a202695 Binary files /dev/null and b/Library/metadata/db/db713b3fbff3647e1a78f8d55cd305ea.info differ diff --git a/Library/metadata/dc/dc443db3e92b4983b9738c1131f555cb b/Library/metadata/dc/dc443db3e92b4983b9738c1131f555cb new file mode 100644 index 0000000..fcff00c Binary files /dev/null and b/Library/metadata/dc/dc443db3e92b4983b9738c1131f555cb differ diff --git a/Library/metadata/dc/dc443db3e92b4983b9738c1131f555cb.info b/Library/metadata/dc/dc443db3e92b4983b9738c1131f555cb.info new file mode 100644 index 0000000..ef29fd6 Binary files /dev/null and b/Library/metadata/dc/dc443db3e92b4983b9738c1131f555cb.info differ diff --git a/Library/metadata/dd/dd82d9d6b96bf41aba558e22c3da1b0c b/Library/metadata/dd/dd82d9d6b96bf41aba558e22c3da1b0c new file mode 100644 index 0000000..090e7d7 Binary files /dev/null and b/Library/metadata/dd/dd82d9d6b96bf41aba558e22c3da1b0c differ diff --git a/Library/metadata/dd/dd82d9d6b96bf41aba558e22c3da1b0c.info b/Library/metadata/dd/dd82d9d6b96bf41aba558e22c3da1b0c.info new file mode 100644 index 0000000..6a43a11 Binary files /dev/null and b/Library/metadata/dd/dd82d9d6b96bf41aba558e22c3da1b0c.info differ diff --git a/Library/metadata/e1/e181e4ddce753471fa87c55bd31bb364 b/Library/metadata/e1/e181e4ddce753471fa87c55bd31bb364 new file mode 100644 index 0000000..e4adf08 Binary files /dev/null and b/Library/metadata/e1/e181e4ddce753471fa87c55bd31bb364 differ diff --git a/Library/metadata/e1/e181e4ddce753471fa87c55bd31bb364.info b/Library/metadata/e1/e181e4ddce753471fa87c55bd31bb364.info new file mode 100644 index 0000000..432bfdc Binary files /dev/null and b/Library/metadata/e1/e181e4ddce753471fa87c55bd31bb364.info differ diff --git a/Library/metadata/f3/f3b2426e5351fad40938d275bdf32fcd b/Library/metadata/f3/f3b2426e5351fad40938d275bdf32fcd new file mode 100644 index 0000000..4d6aa7c Binary files /dev/null and b/Library/metadata/f3/f3b2426e5351fad40938d275bdf32fcd differ diff --git a/Library/metadata/f3/f3b2426e5351fad40938d275bdf32fcd.info b/Library/metadata/f3/f3b2426e5351fad40938d275bdf32fcd.info new file mode 100644 index 0000000..3b45af3 Binary files /dev/null and b/Library/metadata/f3/f3b2426e5351fad40938d275bdf32fcd.info differ diff --git a/Library/metadata/f5/f5500e5271f504f408770c817efe63db b/Library/metadata/f5/f5500e5271f504f408770c817efe63db new file mode 100644 index 0000000..2a57764 Binary files /dev/null and b/Library/metadata/f5/f5500e5271f504f408770c817efe63db differ diff --git a/Library/metadata/f5/f5500e5271f504f408770c817efe63db.info b/Library/metadata/f5/f5500e5271f504f408770c817efe63db.info new file mode 100644 index 0000000..c05e6e0 Binary files /dev/null and b/Library/metadata/f5/f5500e5271f504f408770c817efe63db.info differ diff --git a/Library/metadata/f5/f5f67c52d1564df4a8936ccd202a3bd8 b/Library/metadata/f5/f5f67c52d1564df4a8936ccd202a3bd8 new file mode 100644 index 0000000..3b542a9 Binary files /dev/null and b/Library/metadata/f5/f5f67c52d1564df4a8936ccd202a3bd8 differ diff --git a/Library/metadata/f5/f5f67c52d1564df4a8936ccd202a3bd8.info b/Library/metadata/f5/f5f67c52d1564df4a8936ccd202a3bd8.info new file mode 100644 index 0000000..311e931 Binary files /dev/null and b/Library/metadata/f5/f5f67c52d1564df4a8936ccd202a3bd8.info differ diff --git a/Library/metadata/f7/f70555f144d8491a825f0804e09c671c b/Library/metadata/f7/f70555f144d8491a825f0804e09c671c new file mode 100644 index 0000000..e2edb2e Binary files /dev/null and b/Library/metadata/f7/f70555f144d8491a825f0804e09c671c differ diff --git a/Library/metadata/f7/f70555f144d8491a825f0804e09c671c.info b/Library/metadata/f7/f70555f144d8491a825f0804e09c671c.info new file mode 100644 index 0000000..df250ee Binary files /dev/null and b/Library/metadata/f7/f70555f144d8491a825f0804e09c671c.info differ diff --git a/Library/metadata/f7/f7437c9e6603c404bb91cbc45fe71c78 b/Library/metadata/f7/f7437c9e6603c404bb91cbc45fe71c78 new file mode 100644 index 0000000..51733e3 Binary files /dev/null and b/Library/metadata/f7/f7437c9e6603c404bb91cbc45fe71c78 differ diff --git a/Library/metadata/f7/f7437c9e6603c404bb91cbc45fe71c78.info b/Library/metadata/f7/f7437c9e6603c404bb91cbc45fe71c78.info new file mode 100644 index 0000000..55a71c7 Binary files /dev/null and b/Library/metadata/f7/f7437c9e6603c404bb91cbc45fe71c78.info differ diff --git a/Library/metadata/f7/f7a78e053d8bad1439ef7060733a754a b/Library/metadata/f7/f7a78e053d8bad1439ef7060733a754a new file mode 100644 index 0000000..4de7bcc Binary files /dev/null and b/Library/metadata/f7/f7a78e053d8bad1439ef7060733a754a differ diff --git a/Library/metadata/f7/f7a78e053d8bad1439ef7060733a754a.info b/Library/metadata/f7/f7a78e053d8bad1439ef7060733a754a.info new file mode 100644 index 0000000..6c6ae3a Binary files /dev/null and b/Library/metadata/f7/f7a78e053d8bad1439ef7060733a754a.info differ diff --git a/Library/metadata/f7/f7b54ff4a43d4fcf81b4538b678e0bcc b/Library/metadata/f7/f7b54ff4a43d4fcf81b4538b678e0bcc new file mode 100644 index 0000000..05a1ee6 Binary files /dev/null and b/Library/metadata/f7/f7b54ff4a43d4fcf81b4538b678e0bcc differ diff --git a/Library/metadata/f7/f7b54ff4a43d4fcf81b4538b678e0bcc.info b/Library/metadata/f7/f7b54ff4a43d4fcf81b4538b678e0bcc.info new file mode 100644 index 0000000..04c551b Binary files /dev/null and b/Library/metadata/f7/f7b54ff4a43d4fcf81b4538b678e0bcc.info differ diff --git a/Library/metadata/f9/f9d7a1cee29be494aa01ca85e22073ce b/Library/metadata/f9/f9d7a1cee29be494aa01ca85e22073ce new file mode 100644 index 0000000..bf6161d Binary files /dev/null and b/Library/metadata/f9/f9d7a1cee29be494aa01ca85e22073ce differ diff --git a/Library/metadata/f9/f9d7a1cee29be494aa01ca85e22073ce.info b/Library/metadata/f9/f9d7a1cee29be494aa01ca85e22073ce.info new file mode 100644 index 0000000..738f01c Binary files /dev/null and b/Library/metadata/f9/f9d7a1cee29be494aa01ca85e22073ce.info differ diff --git a/Library/metadata/fe/fefae59f217f54041ac9baa918af52aa b/Library/metadata/fe/fefae59f217f54041ac9baa918af52aa new file mode 100644 index 0000000..d13a10f Binary files /dev/null and b/Library/metadata/fe/fefae59f217f54041ac9baa918af52aa differ diff --git a/Library/metadata/fe/fefae59f217f54041ac9baa918af52aa.info b/Library/metadata/fe/fefae59f217f54041ac9baa918af52aa.info new file mode 100644 index 0000000..454a9c4 Binary files /dev/null and b/Library/metadata/fe/fefae59f217f54041ac9baa918af52aa.info differ diff --git a/Library/shadercompiler-UnityShaderCompiler.exe0.log b/Library/shadercompiler-UnityShaderCompiler.exe0.log new file mode 100644 index 0000000..2bbfc7e --- /dev/null +++ b/Library/shadercompiler-UnityShaderCompiler.exe0.log @@ -0,0 +1,28 @@ +Base path: C:/Program Files/Unity/Editor/Data +Cmd: getPlatforms +Cmd: preprocess + insize=1476 outsize=568 ok=1 +Cmd: preprocess + insize=4979 outsize=1320 ok=1 +Cmd: preprocess + insize=3676 outsize=1080 ok=1 +Cmd: preprocess + insize=931 outsize=460 ok=1 +Cmd: preprocess + insize=4782 outsize=1244 ok=1 +Cmd: preprocess + insize=1113 outsize=559 ok=1 +Cmd: preprocess + insize=1151 outsize=527 ok=1 +Cmd: preprocess + insize=3587 outsize=1079 ok=1 +Cmd: preprocess + insize=984 outsize=435 ok=1 +Cmd: preprocess + insize=1141 outsize=517 ok=1 +Cmd: preprocess + insize=1120 outsize=537 ok=1 +Cmd: preprocess + insize=1190 outsize=511 ok=1 +Cmd: preprocess + insize=1008 outsize=489 ok=1 diff --git a/ProjectSettings/AudioManager.asset b/ProjectSettings/AudioManager.asset new file mode 100644 index 0000000..7bf2e21 Binary files /dev/null and b/ProjectSettings/AudioManager.asset differ diff --git a/ProjectSettings/ClusterInputManager.asset b/ProjectSettings/ClusterInputManager.asset new file mode 100644 index 0000000..0cb6ab1 Binary files /dev/null and b/ProjectSettings/ClusterInputManager.asset differ diff --git a/ProjectSettings/DynamicsManager.asset b/ProjectSettings/DynamicsManager.asset new file mode 100644 index 0000000..eda3816 Binary files /dev/null and b/ProjectSettings/DynamicsManager.asset differ diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset new file mode 100644 index 0000000..c084adb Binary files /dev/null and b/ProjectSettings/EditorBuildSettings.asset differ diff --git a/ProjectSettings/EditorSettings.asset b/ProjectSettings/EditorSettings.asset new file mode 100644 index 0000000..82fe2fb Binary files /dev/null and b/ProjectSettings/EditorSettings.asset differ diff --git a/ProjectSettings/GraphicsSettings.asset b/ProjectSettings/GraphicsSettings.asset new file mode 100644 index 0000000..a528f5d Binary files /dev/null and b/ProjectSettings/GraphicsSettings.asset differ diff --git a/ProjectSettings/InputManager.asset b/ProjectSettings/InputManager.asset new file mode 100644 index 0000000..1a1131a Binary files /dev/null and b/ProjectSettings/InputManager.asset differ diff --git a/ProjectSettings/NavMeshAreas.asset b/ProjectSettings/NavMeshAreas.asset new file mode 100644 index 0000000..13eec1e Binary files /dev/null and b/ProjectSettings/NavMeshAreas.asset differ diff --git a/ProjectSettings/NetworkManager.asset b/ProjectSettings/NetworkManager.asset new file mode 100644 index 0000000..cdd1e69 Binary files /dev/null and b/ProjectSettings/NetworkManager.asset differ diff --git a/ProjectSettings/Physics2DSettings.asset b/ProjectSettings/Physics2DSettings.asset new file mode 100644 index 0000000..71676f8 Binary files /dev/null and b/ProjectSettings/Physics2DSettings.asset differ diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset new file mode 100644 index 0000000..628e04f Binary files /dev/null and b/ProjectSettings/ProjectSettings.asset differ diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt new file mode 100644 index 0000000..1049cc7 --- /dev/null +++ b/ProjectSettings/ProjectVersion.txt @@ -0,0 +1 @@ +m_EditorVersion: 5.5.2f1 diff --git a/ProjectSettings/QualitySettings.asset b/ProjectSettings/QualitySettings.asset new file mode 100644 index 0000000..e62348b Binary files /dev/null and b/ProjectSettings/QualitySettings.asset differ diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset new file mode 100644 index 0000000..3fa96fb Binary files /dev/null and b/ProjectSettings/TagManager.asset differ diff --git a/ProjectSettings/TimeManager.asset b/ProjectSettings/TimeManager.asset new file mode 100644 index 0000000..851c9d2 Binary files /dev/null and b/ProjectSettings/TimeManager.asset differ diff --git a/ProjectSettings/UnityConnectSettings.asset b/ProjectSettings/UnityConnectSettings.asset new file mode 100644 index 0000000..bc6433f Binary files /dev/null and b/ProjectSettings/UnityConnectSettings.asset differ diff --git a/UnitySteer.v12.suo b/UnitySteer.v12.suo new file mode 100644 index 0000000..c2539b6 Binary files /dev/null and b/UnitySteer.v12.suo differ diff --git a/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..dade1fc Binary files /dev/null and b/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/obj/Debug/build.force b/obj/Debug/build.force new file mode 100644 index 0000000..e69de29