csharp how to make object rotate forever

Code Example - csharp how to make object rotate forever

                
                        //Use FixedUpdate instead of Update for physics, rotation, and movement.
void FixedUpdate()
    {
        laserPointer.Rotate(x, y, z);
  		//Use your own rotation values to replace x, y and z.
    }
                    
                
 

object spin unity

                        
                                void FixedUpdate()
{
	gameObject.transform.Rotate(0, 0, +1)//Rotate(x, y, z) + = add one per update
}
                            
                        
 

unity always rotating object

                        
                                public float speed = 50.0f;


    void Update()
    {
        transform.Rotate(Vector3.up * speed * Time.deltaTime);
    }