public override void MoveToInventoryEvent() { if (enchantment == 0) { //Object links to a spell object if (linkedspell != null) { GameObject clonelinkedspell = Object.Instantiate(linkedspell.gameObject); clonelinkedspell.name = ObjectInteraction.UniqueObjectName(clonelinkedspell.GetComponent <ObjectInteraction>()); clonelinkedspell.gameObject.transform.parent = GameWorldController.instance.InventoryMarker.transform; linkedspell = clonelinkedspell.GetComponent <a_spell>(); //COpy data from original to new ObjectInteraction.CopyStaticProperties(linkedspell.objInt(), clonelinkedspell.GetComponent <ObjectInteraction>()); } } }