Right now when I click on menu “Composer Suite/Speaker” it will spawn the scripts components at the default location making it hard to find and time consuming to set up where I need it in the scene.
I just want it to spawn in front of the editor camera so I can set the scene up quicker!
I’m very new to all of this, I would love for some help!
Thank you
using UnityEditor;
using UnityEngine;
public class SpeakerBoxS
{
[MenuItem("Composer Suite/Speaker")]
static void Create()
{
for (int x = 0; x != 1; x++)
{
GameObject go = new GameObject("Speaker Box");
go.transform.position = new Vector3(x, 0, 0);
go.AddComponent<AudioSource>();
go.AddComponent<BoxCollider>();
go.AddComponent<Gizspeaker>();
}
}
}
,