public void SetAttachItem(int itemID, int position) { string text = "1006"; if (position != 0) { text = "1007"; } this.m_GameObjData.AttachID[position] = itemID; S_Item data = GameDataDB.ItemDB.GetData(itemID); if (data == null) { Debug.LogWarning("itemData not be found : " + itemID); return; } GameObject gameObject = ItemGenerator.CreateItemGameObject(data.StoryPrefabName); if (gameObject == null) { Debug.LogWarning("item not be found : " + data.StoryPrefabName); return; } gameObject.name = data.StoryPrefabName; Transform transform = TransformTool.SearchHierarchyForBone(base.gameObject.transform, text); if (transform == null) { Debug.LogWarning("node not be found : " + text); return; } gameObject.transform.position = transform.position; gameObject.transform.rotation = transform.rotation; gameObject.transform.parent = transform; }