// CreateJobs() is called to populate the job window.
private void CreateJobs(int numJobs) {
grid = GameObject.Find("Jobs Grid"); // Locate the Jobs Grid for this job window and store it in grid.
for (int i = 0; i < numJobs; i++) { // Repeat until numJobs has been reached...
NGUITools.AddChild(grid, UIPackagePrefab); // Create a package object and add it to the scene as a child of grid.
}
}