/// <summary> /// Conntects the child mount point to the parent /// </summary> /// <param name="rParent">String representing the parents mount point name</param> /// <param name="rChildItemPath">Resource path to the object we'll instanciate</param> /// <param name="rChildPointName">String representing the child's mount point name</param> /// <returns>GameObject that is the child that is instanciated</returns> public bool ConnectMountPoints(GameObject rParent, string rParentPoint) { if (rParent == null) { return(false); } MountPoints lParentMPs = rParent.GetComponent <MountPoints>(); if (lParentMPs == null) { return(false); } return(lParentMPs.ConnectMountPoints(rParentPoint, Point)); }
/// <summary> /// Conntects the child mount point to the parent /// </summary> /// <param name="rParent">String representing the parents mount point name</param> /// <param name="rChildItemPath">Resource path to the object we'll instanciate</param> /// <param name="rChildPointName">String representing the child's mount point name</param> /// <returns>GameObject that is the child that is instanciated</returns> public bool ConnectMountPoints(string rParentName, string rParentPoint) { GameObject lParent = GameObject.Find(rParentName); if (lParent == null) { return(false); } MountPoints lParentMPs = lParent.GetComponent <MountPoints>(); if (lParentMPs == null) { return(false); } return(lParentMPs.ConnectMountPoints(rParentPoint, Point)); }