Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- public class InstanceTest : MonoBehaviour {
- public int cnt; public bool startTest1 = false; public bool startTest2 = false;
- void Update()
- {
- if (startTest1)
- Test1(cnt);
- if (startTest2)
- Test2(cnt);
- }
- void Test1(int cnt)
- {
- float a;
- for (int i = 0; i < cnt; i++)
- a = 1f + 1f;
- }
- static void Test2(int cnt)
- {
- float a;
- for (int i = 0; i < cnt; i++)
- a = 1f + 1f;
- }
- }
Add Comment
Please, Sign In to add comment