I using the following: Unity 2020 1.17f Personal, Visual Studio, Windows 10 personal. The mesh will only move once, I have tried to move [SerializeField] in the unity GUI and then play, but nothing changes. I would like to thank you for your time and any information on this would be greatly appreciated.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Spinner : MonoBehaviour
{
[SerializeField] float xAngle = 0;
[SerializeField] float yAngle = 0;
[SerializeField] float zAngle = 0;
// Moves all transform children 10 units upwards!
void Start()
{
transform.Rotate(xAngle, yAngle, zAngle);
}
}
//Added this because of the post on GameDev.TV chat.
public class Rotator : MonoBehaviour
{
[SerializeField] float rotationSpeed = 100.0f;
// Update is called once per frame
void Update()
{
transform.Rotate(new Vector3(0f, rotationSpeed * Time.deltaTime, 0f));
}
}