You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

23 lines
680 B

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LandMarkGenerater : MonoBehaviour {
public Transform[] LandMarkLocations;
public void AddHotSpots(GameObject[] hotSpots)
{
foreach(Transform location in LandMarkLocations)
{
int randIndex = Random.Range(0, hotSpots.Length);
float RandomRotation = Random.Range(0, 3) * 90;
GameObject temp = Instantiate(hotSpots[randIndex], transform);
temp.transform.position = location.position;
temp.transform.Rotate(Vector3.up, RandomRotation);
temp.name = "LandMark";
}
}
}