protected override SiteElement AddElementComponent(GameObject elementObject, SerializableSiteElement element) { SerializableModel modelData = element as SerializableModel; if (modelData.custom.modelType == "ply" || modelData.custom.modelType == "las" || modelData.custom.modelType == "xyz") { Debug.Log("Creating new PointsOOC"); PointsOOC newElement = elementObject.AddComponent <PointsOOC>(); return(newElement); } else { Debug.Log("Creating new Model"); Model newElement = elementObject.AddComponent <Model>(); return(newElement); } }
protected override SiteElement AddElementComponent(GameObject elementObject, SerializableSiteElement element) { PointsOOC newElement = elementObject.AddComponent <PointsOOC>(); return(newElement); }