public void CreateVisual(Transform target) { if (!visual) { visual = Instantiate(visualObjectPrefab, target); } visual.name = "visual - " + name; visual.Initialize(GetComponentInChildren <MeshFilter>().mesh, GetComponentInChildren <MeshRenderer>().materials); }
public void OnSceneObjectAdded(VisualObject vo) { vo.Initialize(); Host.SceneManager.CurrentScreen.AddVisualObject(vo); }