private static void NewMenuOption() { GameObject tree = new GameObject("tree"); MtreeComponent mtree = tree.AddComponent <MtreeComponent>(); mtree.GenerateTree(); Selection.activeGameObject = tree; }
private static void CreateNewMtree() { GameObject tree = new GameObject("New Mtree"); MtreeComponent mtree = tree.AddComponent <MtreeComponent>(); mtree.GenerateTree(); Selection.activeGameObject = tree; if (SceneView.lastActiveSceneView != null) { tree.gameObject.transform.position = SceneView.lastActiveSceneView.pivot; } }
private void UpdateTree() { tree.GenerateTree(); }