How To Make Win Objects


Step 1: Make an empty GameObject to hold your Win Object‘s model.

  1. Create a new empty GameObject (I’m going to name mine WinObject).
  2. Add the model you would like to use as a child object (I’m going to just be using a Sphere).

Step 2: Make your Win Object grabbable.

  1. In the parent GameObject, add the Rigidbody and XR Grab Interactable components
    • Configure these components however you would like.
  2. DO NOT place a Collider on the parent GameObject. Place the Collider(s) on your child GameObject that contains the model.
(Optional, but recommended) Add the Select Base component to your parent GameObject.

This is a component that simply prioritizes selecting the object it is attached to when clicking on an object in the Scene View. With this component attached to your parent GameObject, when you click on its child model, it will select the parent GameObject rather than the model’s GameObject.


Step 3: Add and configure the Win Object component to which ever object contains your Collider.

  1. Select the object that holds your Collider. For me, this is my sphere.
  2. Add the Win Object component in the Inspector Window.
  3. Configure the values to your liking.
    • Score Amount lets you change the score value that the Win Object will give the player when it is placed in a Win Container.
    • Destroy On Enter: If this is enabled, then the Win Object will be deleted from the game once it enters the Win Container. This is how the jellyfish in Jellyfishin' work.
    • If Destroy On Enter is enabled, then you must assign the Parent Game Object variable to the parent GameObject of the Win Object.

Step 4: Save your Win Object as a Prefab.

  1. Move your Win Object to the --- GRABBABLES --- folder for organization.
  2. Drag the parent GameObject of your Win Object from the Hierarchy into the Project Window in the Assets/_Prefabs folder.

Next Steps:

  1. Set up a win container