private void PlaySFX(HVRSocketable socketable) { if (AudioGrabbedOverride) { SFXPlayer.Instance.PlaySFX(AudioGrabbedOverride, transform.position); } else if (socketable.SocketedClip) { SFXPlayer.Instance.PlaySFX(socketable.SocketedClip, transform.position); } else if (AudioGrabbedFallback) { SFXPlayer.Instance.PlaySFX(AudioGrabbedFallback, transform.position); } }
public override bool IsValid(HVRSocketable socketable) { if (string.IsNullOrWhiteSpace(SocketType)) { return(false); } if (!socketable) { return(false); } var stringFilter = socketable as HVRStringSocketable; if (stringFilter == null) { return(false); } if (string.IsNullOrWhiteSpace(stringFilter.SocketType)) { return(false); } return(SocketType.ToLowerInvariant().Equals(stringFilter.SocketType.ToLowerInvariant())); }