public ScribblerAnnotation AddScribblerAnnotation(GameObject lineRendererGO, float timeOfCreation, Vector3 center) { ScribblerAnnotation sbAnnotation = new ScribblerAnnotation(); sbAnnotation.ID = ScribblerAnnotationList.Count + 1; sbAnnotation.LineRendererGO = lineRendererGO; sbAnnotation.TimeOfCreation = timeOfCreation; sbAnnotation.center = center; ScribblerAnnotationList.Add(sbAnnotation); return(sbAnnotation); }
public void DeleteScribblerAnnotation(ScribblerAnnotation sbAnnotation) { if (sbAnnotation == null) { Debug.Log("ERROR: ScribblerAnnotation object is null"); return; } foreach (ScribblerAnnotation annotation in ScribblerAnnotationList) { if (annotation.ID == sbAnnotation.ID) { ScribblerAnnotationList.Remove(annotation); Debug.Log("ScribblerAnnotation - " + sbAnnotation.ID + " was delete from list"); } else { Debug.Log("ERROR: Unable to delete ScribblerAnnotation - " + sbAnnotation.ID); } } Debug.Log("ERROR: Unable to find the ScribblerAnnotation - " + sbAnnotation.ID); }