mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 14:29:25 +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;
|
if (!IsOwnBubble) return;
|
||||||
|
|
||||||
bool isAllowed = implementation.IsPermitted ||
|
// Check if requester is allowed to claim
|
||||||
Data.Rule == ShareRule.Everyone ||
|
bool isAllowed = Data.Rule == ShareRule.Everyone ||
|
||||||
(Data.Rule == ShareRule.FriendsOnly && Friends.FriendsWith(requesterId));
|
(Data.Rule == ShareRule.FriendsOnly && Friends.FriendsWith(requesterId));
|
||||||
|
|
||||||
if (!isAllowed)
|
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.Player;
|
||||||
using ABI_RC.Core.Savior;
|
using ABI_RC.Core.Savior;
|
||||||
using ABI_RC.Core.UI;
|
using ABI_RC.Core.UI;
|
||||||
|
@ -7,6 +8,7 @@ using ABI_RC.Systems.Gravity;
|
||||||
using NAK.ShareBubbles.Impl;
|
using NAK.ShareBubbles.Impl;
|
||||||
using NAK.ShareBubbles.Networking;
|
using NAK.ShareBubbles.Networking;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.SceneManagement;
|
||||||
using Object = UnityEngine.Object;
|
using Object = UnityEngine.Object;
|
||||||
|
|
||||||
namespace NAK.ShareBubbles;
|
namespace NAK.ShareBubbles;
|
||||||
|
@ -234,6 +236,9 @@ public class ShareBubbleManager
|
||||||
bubbleRootObject.transform.SetLocalPositionAndRotation(position, rotation);
|
bubbleRootObject.transform.SetLocalPositionAndRotation(position, rotation);
|
||||||
bubbleRootObject.SetActive(true);
|
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);
|
Transform bubbleTransform = bubbleRootObject.transform.GetChild(0);
|
||||||
if (bubbleTransform == null)
|
if (bubbleTransform == null)
|
||||||
throw new InvalidOperationException("Bubble prefab is missing expected child transform");
|
throw new InvalidOperationException("Bubble prefab is missing expected child transform");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue