public void OnPostprocessBuild(BuildReport report) { var receivers = Find.All <ICredentialReceiver>(); foreach (var receiver in receivers) { receiver.ClearCredentials(); } Debug.Log("<== Juniper.CredentialResolver ==>: Credentials cleared"); }
public override void Uninstall() { base.Uninstall(); foreach (var mapper in Find.All <MLSpatialMapper>()) { mapper?.transform ?.Find("Original") ?.gameObject ?.Destroy(); mapper?.Destroy(); } }
public void PauseZone(string zoneName) { JuniperSystem.OnMainThread(() => { var audioSources = Find.All <AudioSource>(a => !a.CompareTag(INTERACTION_SOUND_TAG)); foreach (var audioSource in audioSources) { if (audioSource.IsInZone(zoneName) && audioSource.isPlaying) { audioSource.Pause(); } } }); }
public async Task EnableDopplerAsync(bool value) { #if UNITY_MODULES_AUDIO await JuniperSystem.OnMainThreadAsync(() => { var audioSources = Find.All <AudioSource>(); var doppler = value ? dopplerLevel : 0; foreach (var audioSource in audioSources) { audioSource.dopplerLevel = doppler; } }); #endif // burn a frame await Task.Yield(); }
public override void Awake() { if (Hand == Hand.None) { this.Destroy(); } else { base.Awake(); if (!MLHands.IsStarted) { var result = MLHands.Start(); if (result.IsOk) { var poses = (from hand in Find.All <MagicLeapHand>() from button in hand.nativeButtons.Buttons select button).ToArray(); MLHands.KeyPoseManager.EnableKeyPoses(poses, true); } } handObj = PointerConfig[NativeHandID]; bones = KeyPoints.Select((point, i) => this.Ensure <Transform>( $"Bone{i}", () => { var sphere = GameObject.CreatePrimitive(PrimitiveType.Sphere); sphere.transform.localScale = 0.005f * Vector3.one; if (point.IsValid) { sphere.transform.localPosition = point.Position; } var collid = sphere.GetComponent <Collider>(); collid.isTrigger = true; sphere.Deactivate(); return(sphere); }).Value).ToArray(); } }
public void PlayZone(string zoneName) { JuniperSystem.OnMainThread(() => { var audioSources = Find.All <AudioSource>(a => !a.CompareTag(INTERACTION_SOUND_TAG)); foreach (var audioSource in audioSources) { if (!audioSource.IsInZone(zoneName) && audioSource.isPlaying) { audioSource.Stop(); } else if (audioSource.playOnAwake && !audioSource.isPlaying) { audioSource.Activate(); audioSource.Play(); } } }); }
private static List <IInstallable> GetInstallables() { return(Find.All <IInstallable>().ToList()); }
private void FindAudioSources() { Find.All(hasInteractionSoundTag, ref audioSources); }