- Home /
Making a deep copy of gameobject.
Hello, i have a working inventory, now i want to make quick access panel.When the player drags an item form the inventory to the quick action slot it should copy values of that slot. Is there an easy way to create a reference to the slot in the inventory, so when player uses item from either slot it updates both of them?
Answer by Bunny83 · Jan 13, 2018 at 09:31 PM
Uhm what you describe is the exact opposite of a deep copy. A deep copy creates a completely seperate copy of an object. You seem to actually want just a reference to the same item. However we can't help you since we don't know how your inventory system works, how an inventory item is represented and how you implemented your quick access panel
Your answer
Follow this Question
Related Questions
[SOLVED] Prefab as copy not as reference 1 Answer
How can I clone a Terrain object? (Not the reference) 1 Answer
Clone class variables to another... Copy class not by reference 4 Answers
Can I get a reference (not a copy) to a string from a script? 2 Answers
(Yet another) Accessing array in another script - ref or copy? 1 Answer