-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
01bf967
commit 4916c12
Showing
3 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
Assets/BasicExample/Tests/Runtime/Components/TestSpyComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Copyright (c) 2021-2023 Koji Hasegawa. | ||
// This software is released under the MIT License. | ||
|
||
using UnityEngine; | ||
|
||
namespace BasicExample.Components | ||
{ | ||
/// <summary> | ||
/// テスト内で使用するコンポーネントの例. | ||
/// テストアセンブリにあってもインスペクターの "Add Component" ピッカーで検索できてしまうが、 | ||
/// <c>AddComponentMenuAttribute</c> に "" を渡すことで非表示にできる。 | ||
/// </summary> | ||
[AddComponentMenu("")] // Hide from "Add Component" picker | ||
public class TestSpyComponent : MonoBehaviour | ||
{ | ||
/// <summary> | ||
/// <c>Awake</c> が呼ばれた | ||
/// </summary> | ||
public bool IsAwakeCalled { get; private set; } = false; | ||
|
||
/// <summary> | ||
/// <c>Start</c> が呼ばれた | ||
/// </summary> | ||
public bool IsStartCalled { get; private set; } = false; | ||
|
||
private void Awake() | ||
{ | ||
IsAwakeCalled = true; | ||
} | ||
|
||
private void Start() | ||
{ | ||
IsStartCalled = true; | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
Assets/BasicExample/Tests/Runtime/Components/TestSpyComponent.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.