Renderer Bounds

how would I set a renderers bounds (center and extents) in script?
the inspector provides access to it, but I know its read-only when I try to do the same in a script. Thanks.

Renderer.bounds just tells you the bounds of the renderer. This depends on the object it is rendering. You can’t set the bounds, why would you? The bounds are a result of the objects position / scale / rotation.

If you are creating a mesh a runtime, then you might be looking for Mesh.RecalculateBounds. Otherwise, as @Bunny83 said, there is not need to set the bounds yourself.

as everyone else stated, modifying Mesh.bounds would probably be your solution. my addition to this would be in case the bounds.expand function doesn’t seem to work, modify it through manual expansion, like this:

		//expand the bounding box so that it keeps up with the mesh
		//otherwise the mesh wont show when the mesh is in camera frustum and the bounds are not
		Bounds bounds = new Bounds(mesh.bounds.center, mesh.bounds.size+new Vector3(waveSpeed,waveSpeed,waveSpeed));
		mesh.bounds = bounds;