public static void CreateNewRopeMenuItem() { GameObject selected = Selection.activeGameObject; if (selected != null) { Debug.Log("Creating rope attached to : " + selected.name); } RopeController.CreateNewRope(Vector3.zero, selected); }