Creating and Destroying Primitives

Hi there,

I have the following question:

var core = gameObject.CreatePrimitive(PrimitiveType.Sphere);

This creates a sphere, nothing big. using core.whatever I can move it rotate it, color it or scale it.

No I want to delete it and I thought this would be

Destroy(core);

which simply does nothing…

How do I destroy the sphere now ? And why does it create a new game Object for it (named Sphere)
?

Many thanks in advance …

Kind Regards,

Jens

Works fine for me, though you should be using GameObject.CreatePrimitive (it still works either way)

I think my script was messed somehow, it works like a charm in a blank script…

thank you !