public Component3D AddComponent(Component3D component) { if (component != null) { Components.Add(component); component.LinkedObject = this; } return(component); }
public void RemoveComponent <T>() { Component3D Com = Components.Find(x => x is T); if (Com != null) { Components.Remove(Com); } else { Debug.LogError("3DObject \"" + ObjectName + "\" does not already contain the component \"" + typeof(T).Name + "\""); } }
public bool HasComponent <T>() { Component3D com = Components.Find(x => x is T); return(com != null ? true : false); }