=PREPARATION=

Setting up the bubble gun for use requires many steps and it is best to be knowledgeable about Unity and VRChat SDK 3 before going in.  While I wrote these instructions to best guide people through, it can be complicated for those not acquainted with Unity already.

You will need the following before installing the bubble gun:
-Unity 2018.4.20f1 (this SHOULD be compatible with the upcoming 2019 update, I will fix things and update if needed)
-The newest release of the VRChat Avatars SDK3 (older versions especially from last year will NOT work)
-Your avatar and any of its dependencies, such as shaders.
-Dynamic Bones (must be bought from the Unity store if you do not already have it)

=SETUP=

1) Open your Unity project and ensure you have your avatar fully setup for SDK3.  It is recommended to watch other tutorials on VRChat avatar creation if you need help with this; the example screenshots will show the Da'vali, though the Kita'vali is also natively supported and the bubble gun should work with any avatar you will just need to position/scale it yourself.

https://www.dropbox.com/s/sbjfnnro0x9bpa8/Bubble%20Gun%201.png?dl=0

2) Choose Assets>Import Package>Custom Package and select the BubbleGun.unitypackage file from your file browser.

https://www.dropbox.com/s/z7gtkwlew5mup3c/Bubble%20Gun%202.png?dl=0

3) Click the "All" button to ensure all files are selected and then click "Import" to import the files, wait for it to finish.

https://www.dropbox.com/s/mfeoqrycrjz0l2z/Bubble%20Gun%203.png?dl=0

4) In your Project tab, go the Bubble Gun assets folder and drag the "Bubble Gun.prefab" file onto the base object of your avatar in the Hierarchy panel.

https://www.dropbox.com/s/rnfeb14352uqs5o/Bubble%20Gun%204.png?dl=0

5) Expand the Armature of your avatar so that you see the left and right hand bones.  Typically, they will be under Armature>Hips>Spine>Chest>Left/Right Shoulder>Left/Right Arm>Left/Right Elbow>Left/Right Hand or Wrist.  If you are using the Da'vali or Kita'vali, select the "Hand Prefabs" folder in the project folder and drag the appropriately named prefab onto each hand.  If you are using another model, you will have to create these manually.  You can right click on the hand, choose Create Empty, and manually set the Position, Rotation, and Scale to fit the gun to your hand.  As this is a bit more in-depth and personalized to each avatar I can't offer assistance with this.

https://www.dropbox.com/s/ebsh75rdh7rp3tj/Bubble%20Gun%205.png?dl=0 (Folder typo will be corrected the file you download)

6) Expand the Bubble Gun object in your avatar and select the other Bubble Gun object nested beneath it.  Drag the Bubble Gun Left and Right Hand objects you previously added into the constraint sources in the Inspector panel.  The left hand should be the first, then the right hand beneath.  Do this for both the parent and scale constraint.

https://www.dropbox.com/s/quuf8nu2o3q5rc4/Bubble%20Gun%206.png?dl=0

It should look like this now: https://www.dropbox.com/s/cjpbg235lsvytfp/Bubble%20Gun%206a.png?dl=0

7) Select the Bubble Beam object, and open the Materials folder of the Bubble Gun assets.  There are four different bubble colors provided by default; if you want another, you can recolor the bubble particles with a GIMP .xcf file in the Textures folder and adjust the settings on the Poiyomi materials for the Bubble and Bubble Gun.  Ultimately, choose one of the particle materials and place it in the Material Slot under the Renderer group in the Inspector.

https://www.dropbox.com/s/vanx2q1gfvs15ho/Bubble%20Gun%207.png?dl=0

8) Select the Pop object nested beneath the Bubble Beam.  Choose the Start Color under the base of the particle system, and set the color as desired for the splash effect when the bubble particles impact a surface.

https://www.dropbox.com/s/bia2ifvy0w4u5h0/Bubble%20Gun%208.png?dl=0

9) Select the Gun object, drag one of the Bubble Gun materials onto the material slot in the mesh renderer component.  The only difference between the bubble gun materials is the color of their emissions and the dissolve effect for summoning and unsummoning.

https://www.dropbox.com/s/xkldwnucan98q77/Bubble%20Gun%209.png?dl=0

10) Expand the Bubble World Constraint>Container>Boned Bubble objects and select the Bubble object underneath.  Drag one of the bubble materials into BOTH of the material slots of the skinned mesh renderer.

https://www.dropbox.com/s/dqbrnpdlfw639bl/Bubble%20Gun%2010.png?dl=0

11) Select the base avatar object and scroll down until you see Expressions>Paramaters.  Double click the file shown there to open it in the Inspector, and also return to the Bubble Gun folder in your assets and double click the Bubble Fun FX.controller file.  Select the Parameters tab at the top.

https://www.dropbox.com/s/2ovlmr35iyx9lhd/Bubble%20Gun%2011.png?dl=0

12) You now need to add each of the required paramaeters to the avatar's parameter list.  It is recommended to copy and paste the parameter names between the animator tab and the inspector.  All parameters except BubbleSize are type bool and should have both the Default and Saved boxes unchecked, while BubbleSize is a float with a default of 0.25 and saved can remain checked.

Keep in mind that depending on the age of your avatar project the parameter list may have a number of empty floats shown, these can be switched to type bool and more parameters can be added as needed by clicking the Add button at the top.

https://www.dropbox.com/s/vskq4f2qqmkhh8g/Bubble%20Gun%2012.png?dl=0

13) Select your avatar root object again and scroll back down to Expressions>Menu this time and double click the listed file.

https://www.dropbox.com/s/g1f20pdvw9tgs1a/Bubble%20Gun%2013.png?dl=0

14) In the inspector for the menu, click the Add Control button, give it a name such as "Bubble Menu", change the Type to "Sub Menu", and drag the Bubble Gun Menu.asset file from the bubble gun assets into the Sub Menu slot.

https://www.dropbox.com/s/mer80lstk3wqb21/Bubble%20Gun%2014.png?dl=0

15) Select your avatar root object once more and scroll down to Playable Layers and FX underneath it.  Double click the FX file to open it, then also open the Bubble Gun Params.asset file in the bubble gun assets.

https://www.dropbox.com/s/cz8myo4dybej7sx/Bubble%20Gun%2015.png?dl=0

16) Switch the animator to the parameter tab and start adding new parameters to match the ones the bubble gun needs.  Again, it's recommended to copy and paste the names from the inspector to the animator.  You can add new parameters by clicking the little + button and choosing the appropriate type, mostly bool with float only for BubbleSize.  Leave the default values in the animator alone.

https://www.dropbox.com/s/sy0sos2h6k7e6so/Bubble%20Gun%2016.png?dl=0

17) You will now need to start copying over the Bubble Gun FX.controller layers into your avatar's FX controller.  You can open the Bubble Gun FX.controller file, select each layer, and use your mouse to drag a box around all the nodes to select everything then hit ctrl-c to copy them.

https://www.dropbox.com/s/d14h4vtviojpkam/Bubble%20Gun%2017.png?dl=0

18) Return to your avatar's FX controller as you did previously or through the project assets, make sure you're on the Layers tab and hit the + button to add a new layer.  Give it a name (the name can be anything, or can match my names), hit the small gear icon on the layer, and set the weight to 1.  Click in the layer window and hit ctrl-v to paste the nodes.  They will be a bit of a mess, so you can move the entry, any state, and exit nodes around if desired.  Do this for each of the 3 layers in the Bubble Gun FX.controller file.

https://www.dropbox.com/s/s10n7w1qjv8qx7u/Bubble%20Gun%2018.png?dl=0

19) Make sure each of the 3 layers you added is showing the Waiting state in orange.  If not, right click on the Waiting state and choose "Set as Layer Default State"

https://www.dropbox.com/s/f692yicvjgtarbt/Bubble%20Gun%2019.png?dl=0

(Optional) 20) If your avatar has dynamic bone hand colliders, you can enable collision with the bubble by selecting the Armature under Bubble Gun>Bubble World Constraint>Boned Bubble>Armature in the hierarchy and dragging the object with the colliders on them (likely your hands) into the empty colliders fields of the bubble's dynamic bone.  The Da'vali and Kita'vali do not come with colliders by default and you will need to add them manually if using this model.

https://www.dropbox.com/s/iap5eru080x7lnv/Bubble%20Gun%2020.png?dl=0

Setup is now complete!  Upload your avatar to commit the changes to the VRChat servers.

=INSTRUCTIONS FOR USE=

The bubble gun is controlled via the expression menu and gesture controls.  To use the gun, open your expression menu and choose the new bubble gun menu.  Select the "Enable Gun" option to enable the use of the gun's gestures.  The "Pop Bubble" option will pop the bubble you currently have placed in the world, while the "Bubble Size" slider lets you change the size of the bubble.

With the gun enabled, the gestures used are as follows:

Finger gun gesture to summon the gun.  Once summoned, open palm to unsummon it.

Pull the trigger (thumbs up gesture) to shoot the bubble particle stream while the gun is summoned.  Release (change to any other gesture) to stop firing.

Lower your thumb (pointing gesture) to prime a bubble for placement.  This can be done whether the gun is summoned or not, and will summon it if it was not already summoned.
-A small bubble will attach to the end of the gun, with it in place pull the trigger (fist gesture) to place the bubble.  It will expand to the size set in your menu and be anchored to the world.
-You can return to the pointing gesture to immediately recall the bubble and return to the priming mode.  The bubble beam will not fire without returning to the hand gun gesture first.

The placed bubble will jiggle some as you move, this is normal and expected behavior.

=CREDITS=

Gun model obtained from: https://sketchfab.com/3d-models/sci-fi-handgun-b05d7154d6f54134abc297a0bd3c5132
Boned bubble model created by Zangooseoo
Popping sound from https://www.zapsplat.com/
Summoning/unsummoning sound provided to me by Maar10 and edited by me.
Dissolve textures from Poiyomi shader