The first one is not much of an issue for me because I currently don't need to animate my main cursor, but changing its texture with AC.KickStarter.cursorManager.pointerIcon.texture = mainCursor;
only works with non-animated cursors. If the cursor is animated, I will see the texture change in the manager, but not in the actual game.
The second issue is that I have a marker prefab with an audio source child with a Sound component, an animation controller (with an 'intro' animation that transitions into an 'idle' one, and an 'exit' animation that plays when a 'pathfinding' bool parameter is false). I also have two custom scripts attached here: (1) allows me to play a sound through a specified audio source as an animation event, and (2) checks if the player is pathfinding and sets the animator parameter accordingly.
The intended result is that clicking on the screen will place a marker where the player is pathfinding to, and when the marker is placed, it will do so with a little intro animation and a sound effect. The marker will only disappear when the player has finished pathfinding, at which point it will play an exit animation.
I've got this working correctly, mostly. The only issue I'm having is that despite the fact that the sound IS playing through the child source (I've checked), the Sound component doesn't seem to route it through AC's SFX volume. Even if my SFX volume is set to 0, you'll still be able to hear it (and this is the only sound effect this happens to). The Sound component is working to some capacity because the audio source's volume is changing to 1 and can't be adjusted through the inspector at runtime, which doesn't happen when I disable the Sound component.
Any idea why this is happening?
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Using the ReplaceTexture function will correctly update a cursor texture - including animated - at runtime.
Are you using the Sound component to play the audio? i.e.:
Ahh, right, I wasn't! And I'm sure I'm doing something stupid, but is this not supposed to work? I've commented out the original lines and replaced them with the sound component lines. Now the clips are not being played at all. Am I supposed to use a slightly different syntax?
I also tried simplifying this by changing audioS to be a public Sound component rather than an AudioSource, and then using something like
audioS.Play(soundClips[randomSelected]);
, but it didn't work either.That ought to work. What's the Sound Inspector's Sound type set to, and what is the current volume for that type?
It was a super simple solution.
audioS.Play(soundClips[randomSelected]);
doesn't work, butaudioS.Play(soundClips[randomSelected], false);
does.