public void SetReferences(ref ReactionCollection caller) { int callerID = caller.GetInstanceID(); if (!ReactionCollection.ReactionReferences.Contains(callerID)) { /*Make new refrences here and add them to dictionary*/ if (caller.reactions.Length > 0) { for (int i = 0; i < caller.reactions.Length; i++) { caller.reactions[i] = Instantiate(caller.reactions[i]); } } ReactionCollection.ReactionReferences.Add(callerID); } }