soundvision/UnityProject/Assets/Scenes/Examples/MIDI/script/RandomPosition.cs
2019-10-30 16:02:20 +01:00

14 lines
309 B
C#

using UnityEngine;
namespace cylvester
{
public class RandomPosition : MonoBehaviour
{
public void OnLoopStarted()
{
var x = Random.Range(-3f, 3f);
var y = Random.Range(-3f, 3f);
transform.localPosition = new Vector3(x, y, 0f);
}
}
}