Can't drag Splash prefabs to inspector field

atmosgames

New member
I just downloaded swim add-on and it's working great. However, when I try and drag the splash effects into the Surface Swim Splash fields, I can't. I recorded a short video to show exactly what is happening:

Additionally, I noticed how the array items are nesting inside eachother, as opposed to stacking. It will make sense when I show you in the video above.

Note: I can drag and drop just fine when using the Nolan character from the demo. What's interesting, however, is that if I copy the component from Nolan with all the splash prefabs in their correct inspector slots, and paste into my own character, everything pastes except for the splash prefabs!

1576775803857.png

Thanks so much for your help!
 

Justin

Administrator
Staff member
Thanks for reporting it. This ended up being caused by an exception within the inspector. If you open AudioClipSetInspector.cs and add the following to DrawAudioClipSet it should fix the error and allow you to change values:

Code:
            } else {
                if (audioClipSet == null) { // NEW
                    audioClipSet = new AudioClipSet(); // NEW
                } // NEW
                audioClipSet.Delay = EditorGUILayout.FloatField("Audio Delay", audioClipSet.Delay);
 

atmosgames

New member
I've added your script and noticed a new problem. I'm able to add a particle prefab "splash", but the moment I try and add an audio clip, everything gets reset (the particle prefab suddenly becomes empty)! Please help, thanks so much Justin!
 

Justin

Administrator
Staff member
This one was difficult to work around. I have it fixed but it required a number of changes so the easiest way to get it working for now is to comment
Code:
[InspectorDrawer(typeof(WaterEffect))]
At the top of WaterEffectInspectorDrawer. This will then draw the raw values and while the interface won't be pretty it will work.

For some background, whenever you change a Unity Object Unity throws an exception. This exception is caught but not before the field is set. I had to insert try/catch blocks in a number of places to get it completely working. Unity should not be throwing this exception so I'll try to get a smaller repro case together and submit it to them.
 

atmosgames

New member
Ok great. And I'm still unsure, but did I do something wrong here? Or was this just a glitch with the system? Thanks again Justin, your rock!
 

Minimum

New member
Hey just bumping in as I still have this issue. And as atmosgames said, you rock Justin thanks for all the great work!
 

Justin

Administrator
Staff member
Thanks! This will be fixed when the next version of the controller goes out (around the time Unity 2019.3 is released, so soon).
 
Top