forked from JXPorter/OkitaUnity
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExample.cs
More file actions
42 lines (40 loc) · 998 Bytes
/
Example.cs
File metadata and controls
42 lines (40 loc) · 998 Bytes
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
using UnityEngine;
using System.Collections;
public class Example : MonoBehaviour
{
public int counter = 0;
public int numCubes = 10;
// Use this for initialization
void Start()
{
for (int i = 0; i < numCubes; i++)
{
for (int j = 0; j < numCubes; j++)
{
GameObject box = GameObject.CreatePrimitive(PrimitiveType.Cube);
box.transform.position = new Vector3(i * 2.0f, j * 2.0f, 0f);
}
}
// Debug.Log("at the start");
// for (;;)
// {
// Debug.Log("before the return");
// break; //not return!
// Debug.Log("after the return");
// }
// Debug.Log("at the bottom");
}
// Update is called once per frame
void Update()
{
int counter = 0;
while (true)
{
counter++;
if (counter > 10)
{
break;
}
}
}
}