using UnityEngine; public class Test : MonoBehaviour { public bool bon = true; public int num = 0; // Start is called once before the first execution of Update after the MonoBehaviour is created void Start() { if (bon == true ) { for (int i = 0 ; i<=num ; i++ ) { print (i); } } } // Update is called once per frame void Update() { } }