"must declare a body because it is not marked abstract, extern, or partial" where it say's public static GameObject CreatePrimitive (UnityEngine.PrimitiveType type);

using UnityEngine;
using System.Collections;

public class Assessment2 : MonoBehaviour
{
private Vector3 randomPosition;
private Vector3 offset;
public static GameObject CreatePrimitive (UnityEngine.PrimitiveType type);

// Use this for initialization
void Start () 
{
	// Create a Cylinder
	GameObject cylinder = GameObject + CreatePrimitive(PrimitiveType.Cylinder);
	// Origin via Script 
	cylinder.transform.position = new Vector3(0, 2, 0);

	{
		// Dimensions of Cylinder 
		float height = cylinder.GetComponent<Renderer> ().bounds.size.y;
		Debug.Log ("Cylinder Height = " + height);
	
		float width = cylinder.GetComponent<Renderer> ().bounds.size.x;
		Debug.Log ("Cylinder Width (Diameter) = " + width);

		Debug.Log ("Cylinder Dimensions = " + cylinder.GetComponent<Renderer> ().bounds.size);
	}

	//Generate a Random Position --> output to file (2 & 3)
	Vector3 randomPosition = new Vector3(
		Random.Range(-10, 10), 
		Random.Range(-10, 10), 
		Random.Range(-10,10));
}

void update() {

	// Create a cube at a random position.
	GameObject cube = GameObject = CreatePrimitive (PrimitiveType.Cube);

 	//Cube generated in a random position.
	cube.transform.position = randomPosition;

	offset = new Vector3 (2, 2, 2);
	// A row of Cubes along the x-axis
	for(int i=0; i>5; ++i);

     // create a cube
	GameObject = GameObject.CreatePrimitive(PrimitiveType.Cube);
	Vector3 position = offset + new Vector3 (i * cube.GetComponent<Renderer>);

}

}

Are you just filling in random characters in these lines or are those typos in your post? :slight_smile:

GameObject cylinder = GameObject + CreatePrimitive(PrimitiveType.Cylinder);
GameObject cube = GameObject = CreatePrimitive (PrimitiveType.Cube);

I think it should be like this instead:

GameObject cylinder = GameObject.CreatePrimitive(PrimitiveType.Cylinder);
GameObject cube = GameObject.CreatePrimitive (PrimitiveType.Cube);

Also, your update() method will not be called with a lowercase ā€œuā€.