拉取 Image 時出現 Error: creating build container: short-name "tomcat:9.0.20-jdk8-slim" did not resolve to an alias and no unqualified-search registries are defined in "/etc/containers/registries.conf" 因為 Docker Hub 不希望你拉錯 Image ,使用 UNQUALIFIED IMAGE NAMES 時可能會拉到攻擊者的 Image ,所以 Docker Hub 要你明確指定來源
最後你就可以在 Unity 中開始使用 Unit Test 了,到 Tests 資料夾中,選擇 Create -> Testing -> C# Test Script 建立測試腳本。此外,你也可以在 Tests 資料夾中建立其他資料夾規劃你的測試。
建立測試腳本
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
publicclassNewTestScript { // A Test behaves as an ordinary method [Test] publicvoidNewTestScriptSimplePasses() { // Use the Assert class to test conditions }
// 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() { // Use the Assert class to test conditions. // Use yield to skip a frame. yieldreturnnull; } }
Force over Lifetime X : -20 。 表示粒子在 X 軸方向 持續受到 -20 的力,造成向左的運動。 Y : -5 。 粒子會向 負 Y 方向 持續加速,模擬下墜或重力效果。 Z : 0 。 表示粒子在 Z 軸方向 不受任何外力影響。 Space : World 。 表示所有的力都基於 世界空間,而非粒子系統的局部空間。
Color over Lifetime 模組 Color : 將後段設為透明,讓粒子發射後逐漸變透明。
Size over Lifetime 模組 Size : 指定粒子的大小如何隨著其生命週期從生成到消亡逐漸改變,將它設為一開始小後面變大的曲線,
Collision 模組 Type : World 。 讓粒子會與世界空間中的物理對象(如場景中的碰撞器)發生碰撞,而不是局限於粒子系統本身。 Mode : 2D