Unity prefabs and triggers: make a collectible that behaves
One collectible working once is a promising start. Three copies working after a restart is a much better test of the design.

In this guide
An original Unity 6 workshop using 3D physics. Begin with a project whose player already moves. This is an external Unity workflow, not a Dashpop export target or a claim that Unity setup is automatic.
Define the interaction before the component list
Make a small delivery room: one player, three parcels, and a visible counter. Each parcel can be collected once. The third collection finishes the attempt. A restart restores all three and clears the counter. Use a simple shape for each parcel until this loop works.
Choose whether carrying matters. For this exercise, it does not: collection immediately adds one to the session total. If you later add a carrying limit, collection needs an eligibility check before removal. Stating that boundary now keeps the implementation from quietly solving a different game.
A prefab is more than a saved object
Unity prefabs let you reuse a configured GameObject and its components. Instances retain a relationship to the prefab asset, while overrides can make an instance differ. That distinction matters when a fix should apply to every parcel but a placement change should affect only one.
Create a Parcel object with its visible shape, trigger volume, and collection behavior, then make it a prefab. Place three instances at different positions. Keep the collection rule in the shared asset; let position differ in the room. Before applying an override back to the asset, check whether the change belongs to all copies.
Suppose parcel two has a larger pickup area because it is near an awkward corner. That may be an intentional exception or a sign the layout needs improving. Do not accidentally turn the exception into the default for every parcel. Inspect an untouched instance after editing the prefab.
Make the trigger contract explicit
For the 3D setup here, use a Collider with Is Trigger enabled on the parcel and a compatible collider/body setup for the player. Unity's OnTriggerEnter documentation describes the Rigidbody requirement and physics timing. Keep this exercise in the 3D physics family; Collider2D and the 2D event methods belong to a different setup.
Give the collection script a clear way to recognize the player. On eligible contact, check that the parcel has not already been collected, mark it collected, and notify the session before removing or hiding it. The session owns the total. The parcel should not search for a label by a fragile scene name every time contact occurs.
The one-time guard matters even if a parcel seems to disappear instantly. A player can have several colliders, and events are not a good place to assume a single perfect contact. The state change should be safe when the same pickup is attempted again.
Build one copy, then challenge the shared behavior
Keep a clear distinction between a bug in the event and a bug in the display. If the internal total reaches three but the label says two, inspect the display update. If the total itself jumps by two at one parcel, inspect duplicate callbacks and the one-time guard. Adding a delay to hide the symptom will make the next investigation harder.
If a trigger never fires, inspect the component family, trigger flag, body setup, and collision filtering before rewriting the entire script. Also confirm that you are looking at the active scene and the instance whose components you edited.
- Make one parcel report eligible player entry. Check its trigger volume in the editor.
- Connect that entry to one accepted collection and one counter update.
- Create the prefab and place two more instances.
- Change a visual property on the prefab asset and confirm the intended copies update.
- Collect the parcels in a different order, then restart and repeat.
Finish with restart and a target build
Choose a reset approach deliberately. Reloading a room can recreate its objects, but persistent session state may still survive elsewhere. Reset the state owned outside the room too. If you keep the room and reactivate objects instead, reset each parcel's collected flag as well as its visibility.
Test five cases: enter without being the player, collect once, overlap with multiple player colliders, finish in another order, and restart twice. Then test a build for the intended platform. Editor play is a useful development check; it does not settle input, loading, and layout on the destination device.
Only after the loop is dependable should you add the satisfying burst, sound, and animation. Keep those effects attached to the accepted collection event. That way the celebration follows the rule rather than inventing its own count.
Ask for a bounded change
Give your coding assistant the relevant hierarchy, scripts, Unity version, input setup, and any exact error. Astra and Fable still need that context. Compare them on a working three-parcel loop and the clarity of the fix, not the length of their explanation.
A brief to make your ownUse the existing Unity 6 project and its current input setup. Build a reusable 3D Parcel prefab with one-time collection and a session-owned counter. Inspect the player colliders and Rigidbody setup before choosing trigger handling. Three parcels finish the attempt; restart restores all state. Explain prefab changes versus instance overrides and check repeated contact.
Sources & further reading
References for the tools and facts discussed here. Follow the documentation for the versions you use.
Put your idea to work with the Dashpop Game Engine. Describe a game, play it quickly, and shape it yourself. Start with one change you can test.