mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-01 22:09:23 +00:00
ShareBubbles: move to additive scene
This commit is contained in:
parent
6fb1e0658d
commit
e7b2ad4c31
2 changed files with 8 additions and 3 deletions
|
@ -345,8 +345,8 @@ public class ShareBubble : MonoBehaviour
|
|||
{
|
||||
if (!IsOwnBubble) return;
|
||||
|
||||
bool isAllowed = implementation.IsPermitted ||
|
||||
Data.Rule == ShareRule.Everyone ||
|
||||
// Check if requester is allowed to claim
|
||||
bool isAllowed = Data.Rule == ShareRule.Everyone ||
|
||||
(Data.Rule == ShareRule.FriendsOnly && Friends.FriendsWith(requesterId));
|
||||
|
||||
if (!isAllowed)
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using ABI_RC.Core.Networking.IO.Instancing;
|
||||
using ABI_RC.Core.IO;
|
||||
using ABI_RC.Core.Networking.IO.Instancing;
|
||||
using ABI_RC.Core.Player;
|
||||
using ABI_RC.Core.Savior;
|
||||
using ABI_RC.Core.UI;
|
||||
|
@ -7,6 +8,7 @@ using ABI_RC.Systems.Gravity;
|
|||
using NAK.ShareBubbles.Impl;
|
||||
using NAK.ShareBubbles.Networking;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace NAK.ShareBubbles;
|
||||
|
@ -233,6 +235,9 @@ public class ShareBubbleManager
|
|||
bubbleRootObject = Object.Instantiate(ShareBubblesMod.SharingBubblePrefab);
|
||||
bubbleRootObject.transform.SetLocalPositionAndRotation(position, rotation);
|
||||
bubbleRootObject.SetActive(true);
|
||||
|
||||
// Move to Additive scene to prevent being hit by shader replacement on VR switch
|
||||
SceneManager.MoveGameObjectToScene(bubbleRootObject, SceneManager.GetSceneByName(CVRObjectLoader.AdditiveContentSceneName));
|
||||
|
||||
Transform bubbleTransform = bubbleRootObject.transform.GetChild(0);
|
||||
if (bubbleTransform == null)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue