C# Code

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlanetController : MonoBehaviour
{
// Set up how fast your planet will rotate
[SerializeField] float rotationSpeed = 100;
// Update is called once per frame
void Update ()
{
// Tell Unity how to make the planet rotation
float angleRot = rotationSpeed * Time.deltaTime;
// Tell the planet to rotate
transform.Rotate (Vector3.up * angleRot, Space.World);
}
}