-
Notifications
You must be signed in to change notification settings - Fork 13
/
TestPhysicOrder.cs
100 lines (84 loc) · 2.09 KB
/
TestPhysicOrder.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
using System;
using UnityEngine;
using System.Collections;
public class TestPhysicOrder : MonoBehaviour
{
// Reset to default values
public void Reset()
{
Logs.DoLog();
}
// Awake is called when the script instance is being loaded
public void Awake()
{
StartCoroutine(YieldOneFrame());
StartCoroutine(YieldEndOfFrame());
StartCoroutine(YieldWaitForFixedUpdate());
Logs.DoLog();
}
// This function is called when the object becomes enabled and active
public void OnEnable()
{
Logs.DoLog();
}
// Use this for initialization
void Start()
{
Logs.DoLog();
}
// This function is called every fixed framerate frame, if the MonoBehaviour is enabled
public void FixedUpdate()
{
Logs.DoLog();
}
// Update is called once per frame
void Update()
{
Logs.DoLog();
}
IEnumerator YieldWaitForFixedUpdate()
{
yield return new WaitForFixedUpdate();
Logs.DoLog("WaitForFixedUpdate");
}
IEnumerator YieldOneFrame()
{
yield return 1;
Logs.DoLog("YieldOneFrame");
}
IEnumerator YieldEndOfFrame()
{
yield return new WaitForEndOfFrame();
Logs.DoLog("YieldEndOfFrame");
}
// LateUpdate is called every frame, if the Behaviour is enabled
public void LateUpdate()
{
Logs.DoLog();
}
// This function is called when the behaviour becomes disabled or inactive
public void OnDisable()
{
Logs.DoLog();
}
// This function is called when the MonoBehaviour will be destroyed
public void OnDestroy()
{
Logs.DoLog();
}
// Sent to all game objects when the player gets or looses focus
public void OnApplicationFocus(bool focus)
{
Logs.DoLog();
}
// Sent to all game objects when the player pauses
public void OnApplicationPause(bool pause)
{
Logs.DoLog();
}
// Sent to all game objects before the application is quit
public void OnApplicationQuit()
{
Logs.DoLog();
}
}