fix line endings problem (?)
parent
fb62d36ba1
commit
1cba302bc4
|
@ -1,246 +1,246 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
#
|
||||
# Set and display project path
|
||||
#
|
||||
|
||||
UNITY_PROJECT_PATH="$GITHUB_WORKSPACE/$PROJECT_PATH"
|
||||
echo "Using project path \"$UNITY_PROJECT_PATH\"."
|
||||
|
||||
#
|
||||
# Set and display the artifacts path
|
||||
#
|
||||
|
||||
echo "Using artifacts path \"$ARTIFACTS_PATH\" to save test results."
|
||||
FULL_ARTIFACTS_PATH=$GITHUB_WORKSPACE/$ARTIFACTS_PATH
|
||||
|
||||
#
|
||||
# Set and display the coverage results path
|
||||
#
|
||||
|
||||
echo "Using coverage results path \"$COVERAGE_RESULTS_PATH\" to save test coverage results."
|
||||
FULL_COVERAGE_RESULTS_PATH=$GITHUB_WORKSPACE/$COVERAGE_RESULTS_PATH
|
||||
|
||||
#
|
||||
# Display custom parameters
|
||||
#
|
||||
|
||||
echo "Using custom parameters $CUSTOM_PARAMETERS."
|
||||
|
||||
# The following tests are 2019 mode (requires Unity 2019.2.11f1 or later)
|
||||
# Reference: https://docs.unity3d.com/2019.3/Documentation/Manual/CommandLineArguments.html
|
||||
|
||||
#
|
||||
# Display the unity version
|
||||
#
|
||||
|
||||
echo "Using Unity version \"$UNITY_VERSION\" to test."
|
||||
|
||||
#
|
||||
# Create an empty project for testing if in package mode
|
||||
#
|
||||
|
||||
if [ "$PACKAGE_MODE" = "true" ]; then
|
||||
echo "Running tests on a Unity package rather than a Unity project."
|
||||
|
||||
if ! command -v jq &> /dev/null
|
||||
then
|
||||
echo "jq could not be found. This is required for package mode, and is likely the result of using a custom Docker image. Please use the default image or install jq to your custom image."
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
echo ""
|
||||
echo "###########################"
|
||||
echo "# Package Folder #"
|
||||
echo "###########################"
|
||||
echo ""
|
||||
|
||||
ls -la "$UNITY_PROJECT_PATH"
|
||||
echo ""
|
||||
|
||||
echo "Creating an empty Unity project to add the package $PACKAGE_NAME to."
|
||||
|
||||
TEMP_PROJECT_PATH="./TempProject"
|
||||
|
||||
unity-editor \
|
||||
-batchmode \
|
||||
-createProject "$TEMP_PROJECT_PATH" \
|
||||
-quit
|
||||
|
||||
# use jq to add the package to the temp project through manually modifying Packages/manifest.json
|
||||
echo "Adding package to the temporary project's dependencies and testables..."
|
||||
echo ""
|
||||
|
||||
PACKAGE_MANIFEST_PATH="$TEMP_PROJECT_PATH/Packages/manifest.json"
|
||||
if [ ! -f "$PACKAGE_MANIFEST_PATH" ]; then
|
||||
echo "Packages/mainfest.json was not created properly. This indicates a problem with the Action, not with your package. Logging directories and aborting..."
|
||||
|
||||
echo ""
|
||||
echo "###########################"
|
||||
echo "# Temp Project Folder #"
|
||||
echo "###########################"
|
||||
echo ""
|
||||
|
||||
ls -a "$TEMP_PROJECT_PATH"
|
||||
|
||||
echo ""
|
||||
echo "################################"
|
||||
echo "# Temp Project Packages Folder #"
|
||||
echo "################################"
|
||||
echo ""
|
||||
|
||||
ls -a "$TEMP_PROJECT_PATH/Packages"
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PACKAGE_MANIFEST_JSON=$(cat "$PACKAGE_MANIFEST_PATH")
|
||||
echo "$PACKAGE_MANIFEST_JSON" | \
|
||||
jq \
|
||||
--arg packageName "$PACKAGE_NAME" \
|
||||
--arg projectPath "$UNITY_PROJECT_PATH" \
|
||||
'.dependencies += {"com.unity.testtools.codecoverage": "1.1.1"} | .dependencies += {"\($packageName)": "file:\($projectPath)"} | . += {testables: ["\($packageName)"]}' \
|
||||
> "$PACKAGE_MANIFEST_PATH"
|
||||
|
||||
UNITY_PROJECT_PATH="$TEMP_PROJECT_PATH"
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# Overall info
|
||||
#
|
||||
|
||||
echo ""
|
||||
echo "###########################"
|
||||
echo "# Artifacts folder #"
|
||||
echo "###########################"
|
||||
echo ""
|
||||
echo "Creating \"$FULL_ARTIFACTS_PATH\" if it does not exist."
|
||||
mkdir -p $FULL_ARTIFACTS_PATH
|
||||
|
||||
echo ""
|
||||
echo "###########################"
|
||||
echo "# Project directory #"
|
||||
echo "###########################"
|
||||
echo ""
|
||||
ls -alh $UNITY_PROJECT_PATH
|
||||
|
||||
#
|
||||
# Testing for each platform
|
||||
#
|
||||
for platform in ${TEST_PLATFORMS//;/ }; do
|
||||
if [[ "$platform" == "standalone" ]]; then
|
||||
echo ""
|
||||
echo "###########################"
|
||||
echo "# Building Standalone #"
|
||||
echo "###########################"
|
||||
echo ""
|
||||
|
||||
# Create directories if they do not exist
|
||||
mkdir -p "$UNITY_PROJECT_PATH/Assets/Editor/"
|
||||
mkdir -p "$UNITY_PROJECT_PATH/Assets/Player/"
|
||||
# Copy the scripts
|
||||
cp -R "$ACTION_FOLDER/UnityStandaloneScripts/Assets/Editor/" "$UNITY_PROJECT_PATH/Assets/Editor/"
|
||||
cp -R "$ACTION_FOLDER/UnityStandaloneScripts/Assets/Player/" "$UNITY_PROJECT_PATH/Assets/Player/"
|
||||
# Verify recursive paths
|
||||
ls -Ralph "$UNITY_PROJECT_PATH/Assets/Editor/"
|
||||
ls -Ralph "$UNITY_PROJECT_PATH/Assets/Player/"
|
||||
|
||||
runTests="-runTests -testPlatform StandaloneLinux64 -builtTestRunnerPath $UNITY_PROJECT_PATH/Build/UnityTestRunner-Standalone"
|
||||
else
|
||||
echo ""
|
||||
echo "###########################"
|
||||
echo "# Testing in $platform #"
|
||||
echo "###########################"
|
||||
echo ""
|
||||
|
||||
if [[ "$platform" != "COMBINE_RESULTS" ]]; then
|
||||
runTests="-runTests -testPlatform $platform -testResults $FULL_ARTIFACTS_PATH/$platform-results.xml"
|
||||
else
|
||||
runTests="-quit"
|
||||
fi
|
||||
fi
|
||||
|
||||
unity-editor \
|
||||
-batchmode \
|
||||
-logFile "$FULL_ARTIFACTS_PATH/$platform.log" \
|
||||
-projectPath "$UNITY_PROJECT_PATH" \
|
||||
-coverageResultsPath "$FULL_COVERAGE_RESULTS_PATH" \
|
||||
$runTests \
|
||||
-enableCodeCoverage \
|
||||
-debugCodeOptimization \
|
||||
-coverageOptions "$COVERAGE_OPTIONS" \
|
||||
$CUSTOM_PARAMETERS
|
||||
|
||||
# Catch exit code
|
||||
TEST_EXIT_CODE=$?
|
||||
|
||||
# Print unity log output
|
||||
cat "$FULL_ARTIFACTS_PATH/$platform.log"
|
||||
|
||||
if [[ $TEST_EXIT_CODE -eq 0 && "$platform" == "standalone" ]]; then
|
||||
echo ""
|
||||
echo "###########################"
|
||||
echo "# Testing Standalone #"
|
||||
echo "###########################"
|
||||
echo ""
|
||||
|
||||
# Code Coverage currently only supports code ran in the Editor and not in Standalone/Player.
|
||||
# https://docs.unity.cn/Packages/com.unity.testtools.codecoverage@1.1/manual/TechnicalDetails.html#how-it-works
|
||||
|
||||
xvfb-run -a -e /dev/stdout "$UNITY_PROJECT_PATH/Build/UnityTestRunner-Standalone" \
|
||||
-batchmode \
|
||||
-nographics \
|
||||
-logFile "$FULL_ARTIFACTS_PATH/$platform-player.log" \
|
||||
-testResults "$FULL_ARTIFACTS_PATH/$platform-results.xml"
|
||||
|
||||
# Catch exit code
|
||||
TEST_EXIT_CODE=$?
|
||||
|
||||
# Print player log output
|
||||
cat "$FULL_ARTIFACTS_PATH/$platform-player.log"
|
||||
fi
|
||||
|
||||
# Display results
|
||||
if [ $TEST_EXIT_CODE -eq 0 ]; then
|
||||
echo "Run succeeded, no failures occurred";
|
||||
elif [ $TEST_EXIT_CODE -eq 2 ]; then
|
||||
echo "Run succeeded, some tests failed";
|
||||
elif [ $TEST_EXIT_CODE -eq 3 ]; then
|
||||
echo "Run failure (other failure)";
|
||||
else
|
||||
echo "Unexpected exit code $TEST_EXIT_CODE";
|
||||
fi
|
||||
|
||||
if [ $TEST_EXIT_CODE -ne 0 ]; then
|
||||
TEST_RUNNER_EXIT_CODE=$TEST_EXIT_CODE
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "###########################"
|
||||
echo "# $platform Results #"
|
||||
echo "###########################"
|
||||
echo ""
|
||||
|
||||
if [[ "$platform" != "COMBINE_RESULTS" ]]; then
|
||||
cat "$FULL_ARTIFACTS_PATH/$platform-results.xml"
|
||||
cat "$FULL_ARTIFACTS_PATH/$platform-results.xml" | grep test-run | grep Passed
|
||||
fi
|
||||
done
|
||||
|
||||
#
|
||||
# Permissions
|
||||
#
|
||||
|
||||
# Make a given user owner of all artifacts
|
||||
if [[ -n "$CHOWN_FILES_TO" ]]; then
|
||||
chown -R "$CHOWN_FILES_TO" "$UNITY_PROJECT_PATH"
|
||||
chown -R "$CHOWN_FILES_TO" "$FULL_ARTIFACTS_PATH"
|
||||
chown -R "$CHOWN_FILES_TO" "$FULL_COVERAGE_RESULTS_PATH"
|
||||
fi
|
||||
|
||||
# Add read permissions for everyone to all artifacts
|
||||
chmod -R a+r "$UNITY_PROJECT_PATH"
|
||||
chmod -R a+r "$FULL_ARTIFACTS_PATH"
|
||||
chmod -R a+r "$FULL_COVERAGE_RESULTS_PATH"
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#
|
||||
# Set and display project path
|
||||
#
|
||||
|
||||
UNITY_PROJECT_PATH="$GITHUB_WORKSPACE/$PROJECT_PATH"
|
||||
echo "Using project path \"$UNITY_PROJECT_PATH\"."
|
||||
|
||||
#
|
||||
# Set and display the artifacts path
|
||||
#
|
||||
|
||||
echo "Using artifacts path \"$ARTIFACTS_PATH\" to save test results."
|
||||
FULL_ARTIFACTS_PATH=$GITHUB_WORKSPACE/$ARTIFACTS_PATH
|
||||
|
||||
#
|
||||
# Set and display the coverage results path
|
||||
#
|
||||
|
||||
echo "Using coverage results path \"$COVERAGE_RESULTS_PATH\" to save test coverage results."
|
||||
FULL_COVERAGE_RESULTS_PATH=$GITHUB_WORKSPACE/$COVERAGE_RESULTS_PATH
|
||||
|
||||
#
|
||||
# Display custom parameters
|
||||
#
|
||||
|
||||
echo "Using custom parameters $CUSTOM_PARAMETERS."
|
||||
|
||||
# The following tests are 2019 mode (requires Unity 2019.2.11f1 or later)
|
||||
# Reference: https://docs.unity3d.com/2019.3/Documentation/Manual/CommandLineArguments.html
|
||||
|
||||
#
|
||||
# Display the unity version
|
||||
#
|
||||
|
||||
echo "Using Unity version \"$UNITY_VERSION\" to test."
|
||||
|
||||
#
|
||||
# Create an empty project for testing if in package mode
|
||||
#
|
||||
|
||||
if [ "$PACKAGE_MODE" = "true" ]; then
|
||||
echo "Running tests on a Unity package rather than a Unity project."
|
||||
|
||||
if ! command -v jq &> /dev/null
|
||||
then
|
||||
echo "jq could not be found. This is required for package mode, and is likely the result of using a custom Docker image. Please use the default image or install jq to your custom image."
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
echo ""
|
||||
echo "###########################"
|
||||
echo "# Package Folder #"
|
||||
echo "###########################"
|
||||
echo ""
|
||||
|
||||
ls -la "$UNITY_PROJECT_PATH"
|
||||
echo ""
|
||||
|
||||
echo "Creating an empty Unity project to add the package $PACKAGE_NAME to."
|
||||
|
||||
TEMP_PROJECT_PATH="./TempProject"
|
||||
|
||||
unity-editor \
|
||||
-batchmode \
|
||||
-createProject "$TEMP_PROJECT_PATH" \
|
||||
-quit
|
||||
|
||||
# use jq to add the package to the temp project through manually modifying Packages/manifest.json
|
||||
echo "Adding package to the temporary project's dependencies and testables..."
|
||||
echo ""
|
||||
|
||||
PACKAGE_MANIFEST_PATH="$TEMP_PROJECT_PATH/Packages/manifest.json"
|
||||
if [ ! -f "$PACKAGE_MANIFEST_PATH" ]; then
|
||||
echo "Packages/mainfest.json was not created properly. This indicates a problem with the Action, not with your package. Logging directories and aborting..."
|
||||
|
||||
echo ""
|
||||
echo "###########################"
|
||||
echo "# Temp Project Folder #"
|
||||
echo "###########################"
|
||||
echo ""
|
||||
|
||||
ls -a "$TEMP_PROJECT_PATH"
|
||||
|
||||
echo ""
|
||||
echo "################################"
|
||||
echo "# Temp Project Packages Folder #"
|
||||
echo "################################"
|
||||
echo ""
|
||||
|
||||
ls -a "$TEMP_PROJECT_PATH/Packages"
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PACKAGE_MANIFEST_JSON=$(cat "$PACKAGE_MANIFEST_PATH")
|
||||
echo "$PACKAGE_MANIFEST_JSON" | \
|
||||
jq \
|
||||
--arg packageName "$PACKAGE_NAME" \
|
||||
--arg projectPath "$UNITY_PROJECT_PATH" \
|
||||
'.dependencies += {"com.unity.testtools.codecoverage": "1.1.1"} | .dependencies += {"\($packageName)": "file:\($projectPath)"} | . += {testables: ["\($packageName)"]}' \
|
||||
> "$PACKAGE_MANIFEST_PATH"
|
||||
|
||||
UNITY_PROJECT_PATH="$TEMP_PROJECT_PATH"
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# Overall info
|
||||
#
|
||||
|
||||
echo ""
|
||||
echo "###########################"
|
||||
echo "# Artifacts folder #"
|
||||
echo "###########################"
|
||||
echo ""
|
||||
echo "Creating \"$FULL_ARTIFACTS_PATH\" if it does not exist."
|
||||
mkdir -p $FULL_ARTIFACTS_PATH
|
||||
|
||||
echo ""
|
||||
echo "###########################"
|
||||
echo "# Project directory #"
|
||||
echo "###########################"
|
||||
echo ""
|
||||
ls -alh $UNITY_PROJECT_PATH
|
||||
|
||||
#
|
||||
# Testing for each platform
|
||||
#
|
||||
for platform in ${TEST_PLATFORMS//;/ }; do
|
||||
if [[ "$platform" == "standalone" ]]; then
|
||||
echo ""
|
||||
echo "###########################"
|
||||
echo "# Building Standalone #"
|
||||
echo "###########################"
|
||||
echo ""
|
||||
|
||||
# Create directories if they do not exist
|
||||
mkdir -p "$UNITY_PROJECT_PATH/Assets/Editor/"
|
||||
mkdir -p "$UNITY_PROJECT_PATH/Assets/Player/"
|
||||
# Copy the scripts
|
||||
cp -R "$ACTION_FOLDER/UnityStandaloneScripts/Assets/Editor/" "$UNITY_PROJECT_PATH/Assets/Editor/"
|
||||
cp -R "$ACTION_FOLDER/UnityStandaloneScripts/Assets/Player/" "$UNITY_PROJECT_PATH/Assets/Player/"
|
||||
# Verify recursive paths
|
||||
ls -Ralph "$UNITY_PROJECT_PATH/Assets/Editor/"
|
||||
ls -Ralph "$UNITY_PROJECT_PATH/Assets/Player/"
|
||||
|
||||
runTests="-runTests -testPlatform StandaloneLinux64 -builtTestRunnerPath $UNITY_PROJECT_PATH/Build/UnityTestRunner-Standalone"
|
||||
else
|
||||
echo ""
|
||||
echo "###########################"
|
||||
echo "# Testing in $platform #"
|
||||
echo "###########################"
|
||||
echo ""
|
||||
|
||||
if [[ "$platform" != "COMBINE_RESULTS" ]]; then
|
||||
runTests="-runTests -testPlatform $platform -testResults $FULL_ARTIFACTS_PATH/$platform-results.xml"
|
||||
else
|
||||
runTests="-quit"
|
||||
fi
|
||||
fi
|
||||
|
||||
unity-editor \
|
||||
-batchmode \
|
||||
-logFile "$FULL_ARTIFACTS_PATH/$platform.log" \
|
||||
-projectPath "$UNITY_PROJECT_PATH" \
|
||||
-coverageResultsPath "$FULL_COVERAGE_RESULTS_PATH" \
|
||||
$runTests \
|
||||
-enableCodeCoverage \
|
||||
-debugCodeOptimization \
|
||||
-coverageOptions "$COVERAGE_OPTIONS" \
|
||||
$CUSTOM_PARAMETERS
|
||||
|
||||
# Catch exit code
|
||||
TEST_EXIT_CODE=$?
|
||||
|
||||
# Print unity log output
|
||||
cat "$FULL_ARTIFACTS_PATH/$platform.log"
|
||||
|
||||
if [[ $TEST_EXIT_CODE -eq 0 && "$platform" == "standalone" ]]; then
|
||||
echo ""
|
||||
echo "###########################"
|
||||
echo "# Testing Standalone #"
|
||||
echo "###########################"
|
||||
echo ""
|
||||
|
||||
# Code Coverage currently only supports code ran in the Editor and not in Standalone/Player.
|
||||
# https://docs.unity.cn/Packages/com.unity.testtools.codecoverage@1.1/manual/TechnicalDetails.html#how-it-works
|
||||
|
||||
xvfb-run -a -e /dev/stdout "$UNITY_PROJECT_PATH/Build/UnityTestRunner-Standalone" \
|
||||
-batchmode \
|
||||
-nographics \
|
||||
-logFile "$FULL_ARTIFACTS_PATH/$platform-player.log" \
|
||||
-testResults "$FULL_ARTIFACTS_PATH/$platform-results.xml"
|
||||
|
||||
# Catch exit code
|
||||
TEST_EXIT_CODE=$?
|
||||
|
||||
# Print player log output
|
||||
cat "$FULL_ARTIFACTS_PATH/$platform-player.log"
|
||||
fi
|
||||
|
||||
# Display results
|
||||
if [ $TEST_EXIT_CODE -eq 0 ]; then
|
||||
echo "Run succeeded, no failures occurred";
|
||||
elif [ $TEST_EXIT_CODE -eq 2 ]; then
|
||||
echo "Run succeeded, some tests failed";
|
||||
elif [ $TEST_EXIT_CODE -eq 3 ]; then
|
||||
echo "Run failure (other failure)";
|
||||
else
|
||||
echo "Unexpected exit code $TEST_EXIT_CODE";
|
||||
fi
|
||||
|
||||
if [ $TEST_EXIT_CODE -ne 0 ]; then
|
||||
TEST_RUNNER_EXIT_CODE=$TEST_EXIT_CODE
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "###########################"
|
||||
echo "# $platform Results #"
|
||||
echo "###########################"
|
||||
echo ""
|
||||
|
||||
if [[ "$platform" != "COMBINE_RESULTS" ]]; then
|
||||
cat "$FULL_ARTIFACTS_PATH/$platform-results.xml"
|
||||
cat "$FULL_ARTIFACTS_PATH/$platform-results.xml" | grep test-run | grep Passed
|
||||
fi
|
||||
done
|
||||
|
||||
#
|
||||
# Permissions
|
||||
#
|
||||
|
||||
# Make a given user owner of all artifacts
|
||||
if [[ -n "$CHOWN_FILES_TO" ]]; then
|
||||
chown -R "$CHOWN_FILES_TO" "$UNITY_PROJECT_PATH"
|
||||
chown -R "$CHOWN_FILES_TO" "$FULL_ARTIFACTS_PATH"
|
||||
chown -R "$CHOWN_FILES_TO" "$FULL_COVERAGE_RESULTS_PATH"
|
||||
fi
|
||||
|
||||
# Add read permissions for everyone to all artifacts
|
||||
chmod -R a+r "$UNITY_PROJECT_PATH"
|
||||
chmod -R a+r "$FULL_ARTIFACTS_PATH"
|
||||
chmod -R a+r "$FULL_COVERAGE_RESULTS_PATH"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
if ($null -eq ${env:GIT_PRIVATE_TOKEN})
|
||||
if ($null -eq ${env:GIT_PRIVATE_TOKEN})
|
||||
{
|
||||
Write-Output "GIT_PRIVATE_TOKEN unset skipping"
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ -z "${GIT_PRIVATE_TOKEN}" ]
|
||||
then
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#
|
||||
#
|
||||
# Note: Non default ignore file, as this only tests Builder script.
|
||||
#
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import * as core from '@actions/core';
|
||||
import * as core from '@actions/core';
|
||||
import fs from 'fs';
|
||||
|
||||
class LicensingServerSetup {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { components } from '@octokit/openapi-types';
|
||||
import { components } from '@octokit/openapi-types';
|
||||
|
||||
export function timeHelper(seconds: number): string {
|
||||
return `${seconds.toFixed(3)}s`;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
interface CommonAttributes {
|
||||
interface CommonAttributes {
|
||||
id: string;
|
||||
result: string;
|
||||
asserts: string;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e3a65787d84893340b9dc38af5b7c31f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
fileFormatVersion: 2
|
||||
guid: e3a65787d84893340b9dc38af5b7c31f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "fake.notarealpackage.Editor",
|
||||
"references": [
|
||||
"fake.notarealpackage.Runtime"
|
||||
]
|
||||
}
|
||||
{
|
||||
"name": "fake.notarealpackage.Editor",
|
||||
"references": [
|
||||
"fake.notarealpackage.Runtime"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6c6729c46a2a6594da2ce1182420ab81
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
fileFormatVersion: 2
|
||||
guid: 6c6729c46a2a6594da2ce1182420ab81
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
using System;
|
||||
|
||||
public class BasicCounter
|
||||
{
|
||||
public const int MaxCount = 10;
|
||||
|
||||
public BasicCounter(int count = 0)
|
||||
{
|
||||
Count = count;
|
||||
}
|
||||
|
||||
public void Increment()
|
||||
{
|
||||
Count = Math.Min(MaxCount, Count + 1);
|
||||
}
|
||||
|
||||
public int Count { get; private set; }
|
||||
}
|
||||
using System;
|
||||
|
||||
public class BasicCounter
|
||||
{
|
||||
public const int MaxCount = 10;
|
||||
|
||||
public BasicCounter(int count = 0)
|
||||
{
|
||||
Count = count;
|
||||
}
|
||||
|
||||
public void Increment()
|
||||
{
|
||||
Count = Math.Min(MaxCount, Count + 1);
|
||||
}
|
||||
|
||||
public int Count { get; private set; }
|
||||
}
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
using UnityEngine;
|
||||
|
||||
public class SampleComponent : MonoBehaviour
|
||||
{
|
||||
public BasicCounter Counter;
|
||||
|
||||
void Start()
|
||||
{
|
||||
Counter = new BasicCounter(5);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
Counter.Increment();
|
||||
}
|
||||
}
|
||||
using UnityEngine;
|
||||
|
||||
public class SampleComponent : MonoBehaviour
|
||||
{
|
||||
public BasicCounter Counter;
|
||||
|
||||
void Start()
|
||||
{
|
||||
Counter = new BasicCounter(5);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
Counter.Increment();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
using UnityEngine;
|
||||
|
||||
public class TimerComponent : MonoBehaviour
|
||||
{
|
||||
public BasicCounter Counter = new BasicCounter();
|
||||
public float Timer = 1f;
|
||||
|
||||
void Update()
|
||||
{
|
||||
Timer -= Time.deltaTime;
|
||||
|
||||
if (Timer > 0)
|
||||
return;
|
||||
|
||||
Counter.Increment();
|
||||
Timer = 1f;
|
||||
}
|
||||
}
|
||||
using UnityEngine;
|
||||
|
||||
public class TimerComponent : MonoBehaviour
|
||||
{
|
||||
public BasicCounter Counter = new BasicCounter();
|
||||
public float Timer = 1f;
|
||||
|
||||
void Update()
|
||||
{
|
||||
Timer -= Time.deltaTime;
|
||||
|
||||
if (Timer > 0)
|
||||
return;
|
||||
|
||||
Counter.Increment();
|
||||
Timer = 1f;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"name": "fake.notarealpackage.Runtime"
|
||||
}
|
||||
{
|
||||
"name": "fake.notarealpackage.Runtime"
|
||||
}
|
||||
|
|
|
@ -1,38 +1,38 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using NUnit.Framework;
|
||||
using UnityEngine;
|
||||
using UnityEngine.TestTools;
|
||||
|
||||
namespace Tests
|
||||
{
|
||||
public class SampleEditModeTest
|
||||
{
|
||||
[Test]
|
||||
public void TestIncrement()
|
||||
{
|
||||
// Given
|
||||
var counter = new BasicCounter(0);
|
||||
|
||||
// When
|
||||
counter.Increment();
|
||||
|
||||
// Then
|
||||
Assert.AreEqual(1, counter.Count);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestMaxCount()
|
||||
{
|
||||
// Given
|
||||
var counter = new BasicCounter(BasicCounter.MaxCount);
|
||||
|
||||
// When
|
||||
counter.Increment();
|
||||
|
||||
// Then
|
||||
Assert.AreEqual(BasicCounter.MaxCount, counter.Count);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using NUnit.Framework;
|
||||
using UnityEngine;
|
||||
using UnityEngine.TestTools;
|
||||
|
||||
namespace Tests
|
||||
{
|
||||
public class SampleEditModeTest
|
||||
{
|
||||
[Test]
|
||||
public void TestIncrement()
|
||||
{
|
||||
// Given
|
||||
var counter = new BasicCounter(0);
|
||||
|
||||
// When
|
||||
counter.Increment();
|
||||
|
||||
// Then
|
||||
Assert.AreEqual(1, counter.Count);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestMaxCount()
|
||||
{
|
||||
// Given
|
||||
var counter = new BasicCounter(BasicCounter.MaxCount);
|
||||
|
||||
// When
|
||||
counter.Increment();
|
||||
|
||||
// Then
|
||||
Assert.AreEqual(BasicCounter.MaxCount, counter.Count);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
{
|
||||
"name": "fake.notarealpackage.EditorTests",
|
||||
"references": [
|
||||
"fake.notarealpackage.Runtime",
|
||||
"fake.notarealpackage.Editor"
|
||||
],
|
||||
"optionalUnityReferences": [
|
||||
"TestAssemblies"
|
||||
],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": []
|
||||
{
|
||||
"name": "fake.notarealpackage.EditorTests",
|
||||
"references": [
|
||||
"fake.notarealpackage.Runtime",
|
||||
"fake.notarealpackage.Editor"
|
||||
],
|
||||
"optionalUnityReferences": [
|
||||
"TestAssemblies"
|
||||
],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": []
|
||||
}
|
|
@ -1,31 +1,31 @@
|
|||
using System.Collections;
|
||||
using NUnit.Framework;
|
||||
using UnityEngine;
|
||||
using UnityEngine.TestTools;
|
||||
|
||||
namespace Tests
|
||||
{
|
||||
public class SampleComponentTest
|
||||
{
|
||||
private GameObject target;
|
||||
private SampleComponent component;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
target = GameObject.Instantiate(new GameObject());
|
||||
component = target.AddComponent<SampleComponent>();
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator TestIncrementOnUpdateAfterNextFrame()
|
||||
{
|
||||
// Save the current value, since it was updated after component Start() method called
|
||||
var count = component.Counter.Count;
|
||||
|
||||
// Skip frame and assert the new value
|
||||
yield return null;
|
||||
Assert.AreEqual(count + 1, component.Counter.Count);
|
||||
}
|
||||
}
|
||||
}
|
||||
using System.Collections;
|
||||
using NUnit.Framework;
|
||||
using UnityEngine;
|
||||
using UnityEngine.TestTools;
|
||||
|
||||
namespace Tests
|
||||
{
|
||||
public class SampleComponentTest
|
||||
{
|
||||
private GameObject target;
|
||||
private SampleComponent component;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
target = GameObject.Instantiate(new GameObject());
|
||||
component = target.AddComponent<SampleComponent>();
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator TestIncrementOnUpdateAfterNextFrame()
|
||||
{
|
||||
// Save the current value, since it was updated after component Start() method called
|
||||
var count = component.Counter.Count;
|
||||
|
||||
// Skip frame and assert the new value
|
||||
yield return null;
|
||||
Assert.AreEqual(count + 1, component.Counter.Count);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,42 +1,42 @@
|
|||
using System.Collections;
|
||||
using NUnit.Framework;
|
||||
using UnityEngine.TestTools;
|
||||
|
||||
namespace Tests
|
||||
{
|
||||
public class SamplePlayModeTest
|
||||
{
|
||||
// A Test behaves as an ordinary method
|
||||
[Test]
|
||||
public void NewTestScriptSimplePasses()
|
||||
{
|
||||
// Given
|
||||
var counter = new BasicCounter(0);
|
||||
|
||||
// When
|
||||
counter.Increment();
|
||||
|
||||
// Then
|
||||
Assert.AreEqual(1, counter.Count);
|
||||
}
|
||||
|
||||
// A UnityTest behaves like a coroutine in Play Mode. In Edit Mode you can use
|
||||
// `yield return null;` to skip a frame.
|
||||
[UnityTest]
|
||||
public IEnumerator NewTestScriptWithEnumeratorPasses()
|
||||
{
|
||||
// Given
|
||||
var counter = new BasicCounter(3);
|
||||
|
||||
// Use the Assert class to test conditions.
|
||||
// Use yield to skip a frame.
|
||||
yield return null;
|
||||
|
||||
// When
|
||||
counter.Increment();
|
||||
|
||||
// Then
|
||||
Assert.AreEqual(4, counter.Count);
|
||||
}
|
||||
}
|
||||
}
|
||||
using System.Collections;
|
||||
using NUnit.Framework;
|
||||
using UnityEngine.TestTools;
|
||||
|
||||
namespace Tests
|
||||
{
|
||||
public class SamplePlayModeTest
|
||||
{
|
||||
// A Test behaves as an ordinary method
|
||||
[Test]
|
||||
public void NewTestScriptSimplePasses()
|
||||
{
|
||||
// Given
|
||||
var counter = new BasicCounter(0);
|
||||
|
||||
// When
|
||||
counter.Increment();
|
||||
|
||||
// Then
|
||||
Assert.AreEqual(1, counter.Count);
|
||||
}
|
||||
|
||||
// A UnityTest behaves like a coroutine in Play Mode. In Edit Mode you can use
|
||||
// `yield return null;` to skip a frame.
|
||||
[UnityTest]
|
||||
public IEnumerator NewTestScriptWithEnumeratorPasses()
|
||||
{
|
||||
// Given
|
||||
var counter = new BasicCounter(3);
|
||||
|
||||
// Use the Assert class to test conditions.
|
||||
// Use yield to skip a frame.
|
||||
yield return null;
|
||||
|
||||
// When
|
||||
counter.Increment();
|
||||
|
||||
// Then
|
||||
Assert.AreEqual(4, counter.Count);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,66 +1,66 @@
|
|||
using System.Collections;
|
||||
using NUnit.Framework;
|
||||
using UnityEngine;
|
||||
using UnityEngine.TestTools;
|
||||
|
||||
namespace Tests
|
||||
{
|
||||
public class TimerComponentTest
|
||||
{
|
||||
private GameObject target;
|
||||
private TimerComponent component;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
target = GameObject.Instantiate(new GameObject());
|
||||
component = target.AddComponent<TimerComponent>();
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator TestIncrementAfterSomeTime()
|
||||
{
|
||||
// Save the current value, since it was updated after component Start() method called
|
||||
var count = component.Counter.Count;
|
||||
|
||||
// Skip frame and assert the new value
|
||||
yield return null;
|
||||
Assert.AreEqual(count, component.Counter.Count);
|
||||
|
||||
yield return new WaitForSeconds(1.1f);
|
||||
Assert.AreEqual(count + 1, component.Counter.Count);
|
||||
|
||||
yield return new WaitForSeconds(1.1f);
|
||||
Assert.AreEqual(count + 2, component.Counter.Count);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator TestTimeScaleIsAffectingIncrement()
|
||||
{
|
||||
// Save the current value, since it was updated after component Start() method called
|
||||
var count = component.Counter.Count;
|
||||
Time.timeScale = .5f;
|
||||
|
||||
// Skip frame and assert the new value
|
||||
yield return null;
|
||||
Assert.AreEqual(count, component.Counter.Count);
|
||||
|
||||
yield return WaitForRealSeconds(1.1f);
|
||||
Assert.AreEqual(count, component.Counter.Count);
|
||||
|
||||
yield return WaitForRealSeconds(1.1f);
|
||||
Assert.AreEqual(count + 1, component.Counter.Count);
|
||||
}
|
||||
|
||||
// Skipping time ignoring Time.scale
|
||||
// https://answers.unity.com/questions/301868/yield-waitforseconds-outside-of-timescale.html
|
||||
public static IEnumerator WaitForRealSeconds(float time)
|
||||
{
|
||||
float start = Time.realtimeSinceStartup;
|
||||
while (Time.realtimeSinceStartup < start + time)
|
||||
{
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
using System.Collections;
|
||||
using NUnit.Framework;
|
||||
using UnityEngine;
|
||||
using UnityEngine.TestTools;
|
||||
|
||||
namespace Tests
|
||||
{
|
||||
public class TimerComponentTest
|
||||
{
|
||||
private GameObject target;
|
||||
private TimerComponent component;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
target = GameObject.Instantiate(new GameObject());
|
||||
component = target.AddComponent<TimerComponent>();
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator TestIncrementAfterSomeTime()
|
||||
{
|
||||
// Save the current value, since it was updated after component Start() method called
|
||||
var count = component.Counter.Count;
|
||||
|
||||
// Skip frame and assert the new value
|
||||
yield return null;
|
||||
Assert.AreEqual(count, component.Counter.Count);
|
||||
|
||||
yield return new WaitForSeconds(1.1f);
|
||||
Assert.AreEqual(count + 1, component.Counter.Count);
|
||||
|
||||
yield return new WaitForSeconds(1.1f);
|
||||
Assert.AreEqual(count + 2, component.Counter.Count);
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator TestTimeScaleIsAffectingIncrement()
|
||||
{
|
||||
// Save the current value, since it was updated after component Start() method called
|
||||
var count = component.Counter.Count;
|
||||
Time.timeScale = .5f;
|
||||
|
||||
// Skip frame and assert the new value
|
||||
yield return null;
|
||||
Assert.AreEqual(count, component.Counter.Count);
|
||||
|
||||
yield return WaitForRealSeconds(1.1f);
|
||||
Assert.AreEqual(count, component.Counter.Count);
|
||||
|
||||
yield return WaitForRealSeconds(1.1f);
|
||||
Assert.AreEqual(count + 1, component.Counter.Count);
|
||||
}
|
||||
|
||||
// Skipping time ignoring Time.scale
|
||||
// https://answers.unity.com/questions/301868/yield-waitforseconds-outside-of-timescale.html
|
||||
public static IEnumerator WaitForRealSeconds(float time)
|
||||
{
|
||||
float start = Time.realtimeSinceStartup;
|
||||
while (Time.realtimeSinceStartup < start + time)
|
||||
{
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
"name": "fake.notarealpackage.RuntimeTests",
|
||||
"references": [
|
||||
"fake.notarealpackage.Runtime"
|
||||
],
|
||||
"optionalUnityReferences": [
|
||||
"TestAssemblies"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": []
|
||||
{
|
||||
"name": "fake.notarealpackage.RuntimeTests",
|
||||
"references": [
|
||||
"fake.notarealpackage.Runtime"
|
||||
],
|
||||
"optionalUnityReferences": [
|
||||
"TestAssemblies"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": []
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4232dbd3889ab6a4393e846291288fb0
|
||||
PackageManifestImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
fileFormatVersion: 2
|
||||
guid: 4232dbd3889ab6a4393e846291288fb0
|
||||
PackageManifestImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
|
@ -1,259 +1,259 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 705507994}
|
||||
m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 11
|
||||
m_GIWorkflowMode: 0
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_TemporalCoherenceThreshold: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 1
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 10
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 500
|
||||
m_PVRBounces: 2
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ShowResolutionOverlay: 1
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_UseShadowmask: 1
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &705507993
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 705507995}
|
||||
- component: {fileID: 705507994}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &705507994
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 705507993}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 8
|
||||
m_Type: 1
|
||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_Lightmapping: 1
|
||||
m_LightShadowCasterMode: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &705507995
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 705507993}
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1 &963194225
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 963194228}
|
||||
- component: {fileID: 963194227}
|
||||
- component: {fileID: 963194226}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &963194226
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 963194225}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &963194227
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 963194225}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_GateFitMode: 2
|
||||
m_FocalLength: 50
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &963194228
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 963194225}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 705507994}
|
||||
m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 11
|
||||
m_GIWorkflowMode: 0
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_TemporalCoherenceThreshold: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 1
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 10
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 500
|
||||
m_PVRBounces: 2
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ShowResolutionOverlay: 1
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_UseShadowmask: 1
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &705507993
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 705507995}
|
||||
- component: {fileID: 705507994}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &705507994
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 705507993}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 8
|
||||
m_Type: 1
|
||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_Lightmapping: 1
|
||||
m_LightShadowCasterMode: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &705507995
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 705507993}
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1 &963194225
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 963194228}
|
||||
- component: {fileID: 963194227}
|
||||
- component: {fileID: 963194226}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &963194226
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 963194225}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &963194227
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 963194225}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_GateFitMode: 2
|
||||
m_FocalLength: 50
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &963194228
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 963194225}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
|
||||
public class BasicCounter
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
|
||||
public class SampleComponent : MonoBehaviour
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
|
||||
public class TimerComponent : MonoBehaviour
|
||||
{
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b668d68a45bb48108ccda73269e3da7b
|
||||
fileFormatVersion: 2
|
||||
guid: b668d68a45bb48108ccda73269e3da7b
|
||||
timeCreated: 1610056748
|
|
@ -1,4 +1,4 @@
|
|||
using System.Collections;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using NUnit.Framework;
|
||||
using UnityEngine;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System.Collections;
|
||||
using System.Collections;
|
||||
using NUnit.Framework;
|
||||
using UnityEngine;
|
||||
using UnityEngine.TestTools;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System.Collections;
|
||||
using System.Collections;
|
||||
using NUnit.Framework;
|
||||
using UnityEngine.TestTools;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System.Collections;
|
||||
using System.Collections;
|
||||
using NUnit.Framework;
|
||||
using UnityEngine;
|
||||
using UnityEngine.TestTools;
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 818b22370d404398b87b47a922a435c9
|
||||
fileFormatVersion: 2
|
||||
guid: 818b22370d404398b87b47a922a435c9
|
||||
timeCreated: 1610056889
|
Loading…
Reference in New Issue