Tool for placing objects into the scene.
This is an example of a custom tool for Unity. It provides an efficient interface for adding objects to a scene. It could be expanded on to handle more tasks and save time during production.
Video Demonstration:
Screenshot:
Code Sample:
private void SpawnObject()
{
Vector2 spawnCircle = Random.insideUnitCircle * spawnRadius;
Vector3 spawnPos = new Vector3(spawnCircle.x, 0f, spawnCircle.y);
objectScale = Random.Range(minScaleVal, maxScaleVal);
string objName = objectBaseName;
if(appendID)
{
objName += objectID.ToString();
objectID++;
}
GameObject newObject = Instantiate(objectToSpawn, spawnPos, Quaternion.identity, objectContainer);
newObject.name = objName;
newObject.transform.localScale = Vector3.one * objectScale;
}