//先在Unity中创建一个C# script
<span style="font-family: Arial, Helvetica, sans-serif;">using UnityEngine;</span>
using System.Collections;
public class NewBehaviourScript : MonoBehaviour {
void Start () {
for (int i=1; i<10; i++) {
string s="";
for(int j=1;j<=i;j++)
{
s+=i+"*"+j+"="+i*j+"\t";
}
print (s);
}
}
void Update () {
}
}
//绑定到camera或其他组件上运行