public bool Detach(IActorAttachment attachment, object context) { DebugUtility.AssertFormat(attachment.owner == this, "The owner of attachment ({0}) must be this Actor : [{1}]", attachment.name, name); attachment.OnDetach(context); if (FindJoint(attachment.jointName, false, out var info)) { info.attachments.Remove(attachment); return(true); } DebugUtility.LogErrorTrace("Missing joint : [{0}], Actor : [{1}], Attachment : {2}", attachment.jointName, name, attachment.name); return(false); }