兼容完成
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 190c3076f50a16140b616bcce99b1070
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9d16ffc7ee257bf43ab23a04430fcf29
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 173396ef0ebab7f458bec5d0deaf4ed2
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"displayName":"Example",
|
||||
"description": "RenderStreaming samples",
|
||||
"createSeparatePackage": false
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8cc18800b9aa50e41b37d454cbe3b6bc
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b4bf2204f409346859b79249938241f3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,146 +0,0 @@
|
||||
#if URS_USE_AR_FOUNDATION
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.InputSystem.Controls;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.XR.ARFoundation;
|
||||
|
||||
namespace Unity.RenderStreaming.Samples
|
||||
{
|
||||
internal class ARFoundationSample : MonoBehaviour
|
||||
{
|
||||
#pragma warning disable 0649
|
||||
[SerializeField] private SignalingManager renderStreaming;
|
||||
[SerializeField] private Button startButton;
|
||||
[SerializeField] private Button stopButton;
|
||||
[SerializeField] private RawImage remoteVideoImage;
|
||||
[SerializeField] private VideoStreamReceiver receiveVideoViewer;
|
||||
[SerializeField] private SingleConnection connection;
|
||||
[SerializeField] private ARSession session;
|
||||
[SerializeField] private Text textPositionX;
|
||||
[SerializeField] private Text textPositionY;
|
||||
[SerializeField] private Text textPositionZ;
|
||||
[SerializeField] private Text textQuaternionX;
|
||||
[SerializeField] private Text textQuaternionY;
|
||||
[SerializeField] private Text textQuaternionZ;
|
||||
[SerializeField] private InputAction positionAction;
|
||||
[SerializeField] private InputAction quaternionAction;
|
||||
#pragma warning restore 0649
|
||||
|
||||
private string _connectionId;
|
||||
private RenderStreamingSettings settings;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
startButton.onClick.AddListener(CreateConnection);
|
||||
stopButton.onClick.AddListener(DeleteConnection);
|
||||
|
||||
startButton.gameObject.SetActive(true);
|
||||
stopButton.gameObject.SetActive(false);
|
||||
|
||||
receiveVideoViewer.OnUpdateReceiveTexture += texture => remoteVideoImage.texture = texture;
|
||||
|
||||
settings = SampleManager.Instance.Settings;
|
||||
}
|
||||
|
||||
IEnumerator Start()
|
||||
{
|
||||
if (!renderStreaming.runOnAwake)
|
||||
{
|
||||
if (settings != null)
|
||||
renderStreaming.useDefaultSettings = settings.UseDefaultSettings;
|
||||
if (settings?.SignalingSettings != null)
|
||||
renderStreaming.SetSignalingSettings(settings.SignalingSettings);
|
||||
renderStreaming.Run();
|
||||
}
|
||||
|
||||
if ((ARSession.state == ARSessionState.None) ||
|
||||
(ARSession.state == ARSessionState.CheckingAvailability))
|
||||
{
|
||||
yield return ARSession.CheckAvailability();
|
||||
}
|
||||
|
||||
if (ARSession.state == ARSessionState.Unsupported)
|
||||
{
|
||||
// Start some fallback experience for unsupported devices
|
||||
Debug.LogError("AR foundation is not supported on this device.");
|
||||
}
|
||||
else
|
||||
{
|
||||
// Start the AR session
|
||||
session.enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
positionAction.Enable();
|
||||
positionAction.performed += UpdatePosition;
|
||||
positionAction.started += UpdatePosition;
|
||||
positionAction.canceled += UpdatePosition;
|
||||
|
||||
quaternionAction.Enable();
|
||||
quaternionAction.performed += UpdateQuaternion;
|
||||
quaternionAction.started += UpdateQuaternion;
|
||||
quaternionAction.canceled += UpdateQuaternion;
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
positionAction.Disable();
|
||||
positionAction.performed -= UpdatePosition;
|
||||
positionAction.started -= UpdatePosition;
|
||||
positionAction.canceled -= UpdatePosition;
|
||||
|
||||
quaternionAction.Disable();
|
||||
quaternionAction.performed -= UpdateQuaternion;
|
||||
quaternionAction.started -= UpdateQuaternion;
|
||||
quaternionAction.canceled -= UpdateQuaternion;
|
||||
}
|
||||
|
||||
private void UpdatePosition(InputAction.CallbackContext context)
|
||||
{
|
||||
if (context.control is Vector3Control control)
|
||||
{
|
||||
Vector3 value = control.ReadValue();
|
||||
textPositionX.text = value.x.ToString("f2");
|
||||
textPositionY.text = value.y.ToString("f2");
|
||||
textPositionZ.text = value.z.ToString("f2");
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateQuaternion(InputAction.CallbackContext context)
|
||||
{
|
||||
if (context.control is QuaternionControl control)
|
||||
{
|
||||
Quaternion value = control.ReadValue();
|
||||
textQuaternionX.text = value.eulerAngles.x.ToString("f2");
|
||||
textQuaternionY.text = value.eulerAngles.y.ToString("f2");
|
||||
textQuaternionZ.text = value.eulerAngles.z.ToString("f2");
|
||||
}
|
||||
}
|
||||
|
||||
void CreateConnection()
|
||||
{
|
||||
if (settings != null)
|
||||
receiveVideoViewer.SetCodec(settings.ReceiverVideoCodec);
|
||||
|
||||
_connectionId = System.Guid.NewGuid().ToString("N");
|
||||
connection.CreateConnection(_connectionId);
|
||||
|
||||
startButton.gameObject.SetActive(false);
|
||||
stopButton.gameObject.SetActive(true);
|
||||
}
|
||||
void DeleteConnection()
|
||||
{
|
||||
connection.DeleteConnection(_connectionId);
|
||||
_connectionId = null;
|
||||
|
||||
startButton.gameObject.SetActive(true);
|
||||
stopButton.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 11a75a8d7bfb939449ddb4a45d07259d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,14 +0,0 @@
|
||||
using UnityEngine.UI;
|
||||
|
||||
/// <summary>
|
||||
/// See below
|
||||
/// https://forum.unity.com/threads/aspectratiofitter-new-restriction-in-2020-2.1022683/
|
||||
/// </summary>
|
||||
internal class AspectRatioFitterPatched : AspectRatioFitter
|
||||
{
|
||||
protected override void Start()
|
||||
{
|
||||
base.Start();
|
||||
SetDirty();
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b0f052816c2714604bd4a5a506eb7f43
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,3 +0,0 @@
|
||||
This sample demonstrates how to integrate Unity Render Streaming with AR Foundation.
|
||||
|
||||
https://docs.unity3d.com/Packages/com.unity.renderstreaming@3.1/manual/sample-arfoundation.html
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d67b381213d6e4386b4a290d356155bf
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e6ec203b5c0d948af88efb7ab0c234a7
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: da10b86dde5e88a4abd624d6644a9b11
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,121 +0,0 @@
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Unity.RenderStreaming.Samples
|
||||
{
|
||||
class BidirectionalSample : MonoBehaviour
|
||||
{
|
||||
#pragma warning disable 0649
|
||||
[SerializeField] private SignalingManager renderStreaming;
|
||||
[SerializeField] private Dropdown webcamSelectDropdown;
|
||||
[SerializeField] private Dropdown microphoneSelectDropdown;
|
||||
[SerializeField] private Toggle audioLoopbackToggle;
|
||||
[SerializeField] private Button startButton;
|
||||
[SerializeField] private Button setUpButton;
|
||||
[SerializeField] private Button hangUpButton;
|
||||
[SerializeField] private InputField connectionIdInput;
|
||||
[SerializeField] private RawImage localVideoImage;
|
||||
[SerializeField] private RawImage remoteVideoImage;
|
||||
[SerializeField] private AudioSource receiveAudioSource;
|
||||
[SerializeField] private VideoStreamSender webCamStreamer;
|
||||
[SerializeField] private VideoStreamReceiver receiveVideoViewer;
|
||||
[SerializeField] private AudioStreamSender microphoneStreamer;
|
||||
[SerializeField] private AudioStreamReceiver receiveAudioViewer;
|
||||
[SerializeField] private HostConnection singleConnection;
|
||||
#pragma warning restore 0649
|
||||
|
||||
private string connectionId;
|
||||
private RenderStreamingSettings settings;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
|
||||
startButton.interactable = true;
|
||||
webcamSelectDropdown.interactable = true;
|
||||
setUpButton.interactable = false;
|
||||
hangUpButton.interactable = false;
|
||||
connectionIdInput.interactable = true;
|
||||
startButton.onClick.AddListener(() =>
|
||||
{
|
||||
webCamStreamer.enabled = true;
|
||||
startButton.interactable = false;
|
||||
webcamSelectDropdown.interactable = false;
|
||||
microphoneStreamer.enabled = true;
|
||||
microphoneSelectDropdown.interactable = false;
|
||||
setUpButton.interactable = true;
|
||||
});
|
||||
setUpButton.onClick.AddListener(SetUp);
|
||||
hangUpButton.onClick.AddListener(HangUp);
|
||||
connectionIdInput.onValueChanged.AddListener(input => connectionId = input);
|
||||
connectionIdInput.text = $"{Random.Range(0, 99999):D5}";
|
||||
webcamSelectDropdown.onValueChanged.AddListener(index => webCamStreamer.sourceDeviceIndex = index);
|
||||
webcamSelectDropdown.options = WebCamTexture.devices.Select(x => x.name).Select(x => new Dropdown.OptionData(x)).ToList();
|
||||
webCamStreamer.OnStartedStream += id => receiveVideoViewer.enabled = true;
|
||||
webCamStreamer.OnStartedStream += _ => localVideoImage.texture = webCamStreamer.sourceWebCamTexture;
|
||||
|
||||
audioLoopbackToggle.onValueChanged.AddListener(isOn =>
|
||||
{
|
||||
microphoneStreamer.loopback = isOn;
|
||||
});
|
||||
microphoneStreamer.OnStartedStream += id => microphoneStreamer.loopback = audioLoopbackToggle.isOn;
|
||||
|
||||
settings = SampleManager.Instance.Settings;
|
||||
if (settings != null)
|
||||
{
|
||||
webCamStreamer.width = (uint)settings.StreamSize.x;
|
||||
webCamStreamer.height = (uint)settings.StreamSize.y;
|
||||
}
|
||||
|
||||
receiveVideoViewer.OnUpdateReceiveTexture += texture => remoteVideoImage.texture = texture;
|
||||
|
||||
microphoneSelectDropdown.onValueChanged.AddListener(index => microphoneStreamer.sourceDeviceIndex = index);
|
||||
microphoneSelectDropdown.options =
|
||||
Microphone.devices.Select(x => new Dropdown.OptionData(x)).ToList();
|
||||
receiveAudioViewer.targetAudioSource = receiveAudioSource;
|
||||
receiveAudioViewer.OnUpdateReceiveAudioSource += source =>
|
||||
{
|
||||
source.loop = true;
|
||||
source.Play();
|
||||
};
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
if (renderStreaming.runOnAwake)
|
||||
return;
|
||||
if (settings != null)
|
||||
renderStreaming.useDefaultSettings = settings.UseDefaultSettings;
|
||||
if (settings?.SignalingSettings != null)
|
||||
renderStreaming.SetSignalingSettings(settings.SignalingSettings);
|
||||
renderStreaming.Run();
|
||||
}
|
||||
|
||||
private void SetUp()
|
||||
{
|
||||
setUpButton.interactable = false;
|
||||
hangUpButton.interactable = true;
|
||||
connectionIdInput.interactable = false;
|
||||
|
||||
if (settings != null)
|
||||
{
|
||||
receiveVideoViewer.SetCodec(settings.ReceiverVideoCodec);
|
||||
webCamStreamer.SetCodec(settings.SenderVideoCodec);
|
||||
}
|
||||
|
||||
singleConnection.CreateConnection(connectionId);
|
||||
}
|
||||
|
||||
private void HangUp()
|
||||
{
|
||||
singleConnection.DeleteConnection(connectionId);
|
||||
|
||||
remoteVideoImage.texture = null;
|
||||
setUpButton.interactable = true;
|
||||
hangUpButton.interactable = false;
|
||||
connectionIdInput.interactable = true;
|
||||
connectionIdInput.text = $"{Random.Range(0, 99999):D5}";
|
||||
localVideoImage.texture = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0ae98fcc4fa36bd48877f86930b988de
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d54e8b8e62b060745953b53cf3fa0e91
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f47df8540d2ee994196abbd7365855f2
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,287 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.InputSystem.Layouts;
|
||||
using UnityEngine.InputSystem.XR;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Unity.RenderStreaming.Samples
|
||||
{
|
||||
using InputSystem = UnityEngine.InputSystem.InputSystem;
|
||||
|
||||
static class InputReceiverExtension
|
||||
{
|
||||
public static void CalculateInputRegion(this InputReceiver reveiver, Vector2Int size)
|
||||
{
|
||||
reveiver.CalculateInputRegion(size, new Rect(0, 0, Screen.width, Screen.height));
|
||||
}
|
||||
}
|
||||
|
||||
static class InputActionExtension
|
||||
{
|
||||
public static void AddListener(this InputAction action, Action<InputAction.CallbackContext> callback)
|
||||
{
|
||||
action.started += callback;
|
||||
action.performed += callback;
|
||||
action.canceled += callback;
|
||||
}
|
||||
}
|
||||
|
||||
class BroadcastSample : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private SignalingManager renderStreaming;
|
||||
[SerializeField] private InputReceiver inputReceiver;
|
||||
[SerializeField] private SimpleCameraControllerV2 cameraController;
|
||||
[SerializeField] private UIControllerV2 uiController;
|
||||
[SerializeField] private VideoStreamSender videoStreamSender;
|
||||
[SerializeField] private Dropdown videoSourceTypeSelector;
|
||||
[SerializeField] private Dropdown bandwidthSelector;
|
||||
[SerializeField] private Dropdown scaleResolutionDownSelector;
|
||||
[SerializeField] private Dropdown framerateSelector;
|
||||
[SerializeField] private Dropdown resolutionSelector;
|
||||
|
||||
private Dictionary<string, VideoStreamSource> videoSourceTypeOptions = new Dictionary<string, VideoStreamSource>
|
||||
{
|
||||
{"Screen", VideoStreamSource.Screen },
|
||||
{"Camera", VideoStreamSource.Camera },
|
||||
{"Texture", VideoStreamSource.Texture },
|
||||
{"WebCam", VideoStreamSource.WebCamera }
|
||||
};
|
||||
|
||||
private Dictionary<string, uint> bandwidthOptions =
|
||||
new Dictionary<string, uint>()
|
||||
{
|
||||
{ "10000", 10000 },
|
||||
{ "2000", 2000 },
|
||||
{ "1000", 1000 },
|
||||
{ "500", 500 },
|
||||
{ "250", 250 },
|
||||
{ "125", 125 },
|
||||
};
|
||||
|
||||
private Dictionary<string, float> scaleResolutionDownOptions =
|
||||
new Dictionary<string, float>()
|
||||
{
|
||||
{ "Not scaling", 1.0f },
|
||||
{ "Down scale by 2.0", 2.0f },
|
||||
{ "Down scale by 4.0", 4.0f },
|
||||
{ "Down scale by 8.0", 8.0f },
|
||||
{ "Down scale by 16.0", 16.0f }
|
||||
};
|
||||
|
||||
private Dictionary<string, float> framerateOptions =
|
||||
new Dictionary<string, float>
|
||||
{
|
||||
{ "90", 90f },
|
||||
{ "60", 60f },
|
||||
{ "30", 30f },
|
||||
{ "20", 20f },
|
||||
{ "10", 10f },
|
||||
{ "5", 5f },
|
||||
};
|
||||
|
||||
private Dictionary<string, Vector2Int> resolutionOptions =
|
||||
new Dictionary<string, Vector2Int>
|
||||
{
|
||||
{ "640x480", new Vector2Int(640, 480) },
|
||||
{ "1280x720", new Vector2Int(1280, 720) },
|
||||
{ "1600x1200", new Vector2Int(1600, 1200) },
|
||||
{ "1920x1200", new Vector2Int(1920, 1200) },
|
||||
{ "2560x1440", new Vector2Int(2560, 1440) },
|
||||
};
|
||||
|
||||
private RenderStreamingSettings settings;
|
||||
private int lastWidth;
|
||||
private int lastHeight;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
#if URS_USE_AR_FOUNDATION
|
||||
InputSystem.RegisterLayout<UnityEngine.XR.ARSubsystems.HandheldARInputDevice>(
|
||||
matches: new InputDeviceMatcher()
|
||||
.WithInterface(XRUtilities.InterfaceMatchAnyVersion)
|
||||
);
|
||||
#endif
|
||||
settings = SampleManager.Instance.Settings;
|
||||
if (settings != null)
|
||||
{
|
||||
if (videoStreamSender.source != VideoStreamSource.Texture)
|
||||
{
|
||||
videoStreamSender.width = (uint)settings.StreamSize.x;
|
||||
videoStreamSender.height = (uint)settings.StreamSize.y;
|
||||
}
|
||||
videoStreamSender.SetCodec(settings.SenderVideoCodec);
|
||||
}
|
||||
videoSourceTypeSelector.options = videoSourceTypeOptions
|
||||
.Select(pair => new Dropdown.OptionData { text = pair.Key })
|
||||
.ToList();
|
||||
videoSourceTypeSelector.onValueChanged.AddListener(ChangeVideoSourceType);
|
||||
|
||||
bandwidthSelector.options = bandwidthOptions
|
||||
.Select(pair => new Dropdown.OptionData { text = pair.Key })
|
||||
.ToList();
|
||||
bandwidthSelector.options.Add(new Dropdown.OptionData { text = "Custom" });
|
||||
bandwidthSelector.onValueChanged.AddListener(ChangeBandwidth);
|
||||
|
||||
scaleResolutionDownSelector.options = scaleResolutionDownOptions
|
||||
.Select(pair => new Dropdown.OptionData { text = pair.Key })
|
||||
.ToList();
|
||||
scaleResolutionDownSelector.options.Add(new Dropdown.OptionData { text = "Custom" });
|
||||
scaleResolutionDownSelector.onValueChanged.AddListener(ChangeScaleResolutionDown);
|
||||
|
||||
framerateSelector.options = framerateOptions
|
||||
.Select(pair => new Dropdown.OptionData { text = pair.Key })
|
||||
.ToList();
|
||||
framerateSelector.options.Add(new Dropdown.OptionData { text = "Custom" });
|
||||
framerateSelector.onValueChanged.AddListener(ChangeFramerate);
|
||||
|
||||
resolutionSelector.options = resolutionOptions
|
||||
.Select(pair => new Dropdown.OptionData { text = pair.Key })
|
||||
.ToList();
|
||||
resolutionSelector.options.Add(new Dropdown.OptionData { text = "Custom" });
|
||||
resolutionSelector.onValueChanged.AddListener(ChangeResolution);
|
||||
}
|
||||
|
||||
private void ChangeVideoSourceType(int index)
|
||||
{
|
||||
var source = videoSourceTypeOptions.Values.ElementAt(index);
|
||||
videoStreamSender.source = source;
|
||||
}
|
||||
|
||||
private void ChangeBandwidth(int index)
|
||||
{
|
||||
var bitrate = bandwidthOptions.Values.ElementAt(index);
|
||||
videoStreamSender.SetBitrate(bitrate, bitrate);
|
||||
}
|
||||
|
||||
private void ChangeScaleResolutionDown(int index)
|
||||
{
|
||||
var scale = scaleResolutionDownOptions.Values.ElementAt(index);
|
||||
videoStreamSender.SetScaleResolutionDown(scale);
|
||||
CalculateInputRegion();
|
||||
}
|
||||
|
||||
private void ChangeFramerate(int index)
|
||||
{
|
||||
var framerate = framerateOptions.Values.ElementAt(index);
|
||||
videoStreamSender.SetFrameRate(framerate);
|
||||
}
|
||||
|
||||
private void ChangeResolution(int index)
|
||||
{
|
||||
var resolution = resolutionOptions.Values.ElementAt(index);
|
||||
|
||||
videoStreamSender.SetTextureSize(resolution);
|
||||
CalculateInputRegion();
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
SyncDisplayVideoSenderParameters();
|
||||
|
||||
if (renderStreaming.runOnAwake)
|
||||
return;
|
||||
if (settings != null)
|
||||
renderStreaming.useDefaultSettings = settings.UseDefaultSettings;
|
||||
if (settings?.SignalingSettings != null)
|
||||
renderStreaming.SetSignalingSettings(settings.SignalingSettings);
|
||||
renderStreaming.Run();
|
||||
|
||||
inputReceiver.OnStartedChannel += OnStartedChannel;
|
||||
var map = inputReceiver.currentActionMap;
|
||||
map["Movement"].AddListener(cameraController.OnMovement);
|
||||
map["Look"].AddListener(cameraController.OnLook);
|
||||
map["ResetCamera"].AddListener(cameraController.OnResetCamera);
|
||||
map["Rotate"].AddListener(cameraController.OnRotate);
|
||||
map["Position"].AddListener(cameraController.OnPosition);
|
||||
map["Point"].AddListener(uiController.OnPoint);
|
||||
map["Press"].AddListener(uiController.OnPress);
|
||||
map["PressAnyKey"].AddListener(uiController.OnPressAnyKey);
|
||||
}
|
||||
|
||||
private void OnStartedChannel(string connectionId)
|
||||
{
|
||||
CalculateInputRegion();
|
||||
}
|
||||
|
||||
// Parameters can be changed from the Unity Editor inspector when in Play Mode,
|
||||
// So this method monitors the parameters every frame and updates scene UI.
|
||||
private void Update()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
SyncDisplayVideoSenderParameters();
|
||||
#endif
|
||||
// Call SetInputChange if window size is changed.
|
||||
var width = Screen.width;
|
||||
var height = Screen.height;
|
||||
if (lastWidth == width && lastHeight == height)
|
||||
return;
|
||||
lastWidth = width;
|
||||
lastHeight = height;
|
||||
|
||||
CalculateInputRegion();
|
||||
}
|
||||
|
||||
private void CalculateInputRegion()
|
||||
{
|
||||
if (!inputReceiver.IsConnected)
|
||||
return;
|
||||
var width = (int)(videoStreamSender.width / videoStreamSender.scaleResolutionDown);
|
||||
var height = (int)(videoStreamSender.height / videoStreamSender.scaleResolutionDown);
|
||||
inputReceiver.CalculateInputRegion(new Vector2Int(width, height));
|
||||
inputReceiver.SetEnableInputPositionCorrection(true);
|
||||
}
|
||||
|
||||
private void SyncDisplayVideoSenderParameters()
|
||||
{
|
||||
if (videoStreamSender == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var bandwidthIndex = Array.IndexOf(bandwidthOptions.Values.ToArray(), videoStreamSender.maxBitrate);
|
||||
if (bandwidthIndex < 0)
|
||||
{
|
||||
bandwidthSelector.SetValueWithoutNotify(bandwidthSelector.options.Count - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
bandwidthSelector.SetValueWithoutNotify(bandwidthIndex);
|
||||
}
|
||||
|
||||
var scaleDownIndex = Array.IndexOf(scaleResolutionDownOptions.Values.ToArray(), videoStreamSender.scaleResolutionDown);
|
||||
if (scaleDownIndex < 0)
|
||||
{
|
||||
scaleResolutionDownSelector.SetValueWithoutNotify(bandwidthSelector.options.Count - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
scaleResolutionDownSelector.SetValueWithoutNotify(scaleDownIndex);
|
||||
}
|
||||
|
||||
var framerateIndex = Array.IndexOf(framerateOptions.Values.ToArray(), videoStreamSender.frameRate);
|
||||
if (framerateIndex < 0)
|
||||
{
|
||||
framerateSelector.SetValueWithoutNotify(framerateSelector.options.Count - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
framerateSelector.SetValueWithoutNotify(framerateIndex);
|
||||
}
|
||||
|
||||
var target = new Vector2Int((int)videoStreamSender.width, (int)videoStreamSender.height);
|
||||
var resolutionIndex = Array.IndexOf(resolutionOptions.Values.ToArray(), target);
|
||||
if (resolutionIndex < 0)
|
||||
{
|
||||
resolutionSelector.SetValueWithoutNotify(resolutionSelector.options.Count - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
resolutionSelector.SetValueWithoutNotify(resolutionIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d207eb28d60cb5941a6a8f93a10ec652
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,770 +0,0 @@
|
||||
{
|
||||
"name": "CameraControl",
|
||||
"maps": [
|
||||
{
|
||||
"name": "Player Controls",
|
||||
"id": "cb4067f3-a685-4c86-b9ea-46a6eabfada7",
|
||||
"actions": [
|
||||
{
|
||||
"name": "Movement",
|
||||
"type": "Value",
|
||||
"id": "548e32fd-77d1-40e5-8197-32ca56b41bc0",
|
||||
"expectedControlType": "Vector2",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": true
|
||||
},
|
||||
{
|
||||
"name": "Look",
|
||||
"type": "Value",
|
||||
"id": "8ebbde1f-3044-41bc-bdac-430e0eae1a68",
|
||||
"expectedControlType": "Vector2",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": true
|
||||
},
|
||||
{
|
||||
"name": "ResetCamera",
|
||||
"type": "Button",
|
||||
"id": "7f36745c-6b3f-404f-9df5-42688580b961",
|
||||
"expectedControlType": "Button",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Rotate",
|
||||
"type": "Value",
|
||||
"id": "524fee92-4ef1-4fd9-9cb1-97fb72ae1195",
|
||||
"expectedControlType": "Quaternion",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": true
|
||||
},
|
||||
{
|
||||
"name": "Position",
|
||||
"type": "Value",
|
||||
"id": "50305201-a606-4afe-954c-0666ccaf6c53",
|
||||
"expectedControlType": "Vector3",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": true
|
||||
},
|
||||
{
|
||||
"name": "Point",
|
||||
"type": "Value",
|
||||
"id": "60e72b30-ed9b-46db-80b9-f3660fa002ba",
|
||||
"expectedControlType": "Vector2",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": true
|
||||
},
|
||||
{
|
||||
"name": "Press",
|
||||
"type": "Button",
|
||||
"id": "245d7ad4-63bc-43e3-8d43-432ba35a43f0",
|
||||
"expectedControlType": "Button",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "PressAnyKey",
|
||||
"type": "Value",
|
||||
"id": "02ca192d-af9c-45fe-85c1-c9c38dd9cd48",
|
||||
"expectedControlType": "Key",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": true
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
{
|
||||
"name": "WASD",
|
||||
"id": "99258992-afbc-4513-a4ee-24146566e341",
|
||||
"path": "2DVector",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Movement",
|
||||
"isComposite": true,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"id": "d57e0987-ea9f-4b18-9042-239931d4c060",
|
||||
"path": "<Keyboard>/w",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Movement",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"id": "75168890-922f-4122-9968-1ecac0f33c28",
|
||||
"path": "<Keyboard>/s",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Movement",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"id": "54b99838-0c45-421e-af38-b1f25b3f6927",
|
||||
"path": "<Keyboard>/a",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Movement",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"id": "77680fb0-0b9d-4a74-97de-9e3149ad6526",
|
||||
"path": "<Keyboard>/d",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Movement",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "df04a4e1-fc36-4ebd-b050-536736220da7",
|
||||
"path": "<Gamepad>/leftStick",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Gamepad",
|
||||
"action": "Movement",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "be6b2b51-d13a-4040-bb92-a825e7d4f764",
|
||||
"path": "<Touchscreen>/primaryTouch/delta",
|
||||
"interactions": "",
|
||||
"processors": "ScaleVector2(x=0.1,y=0.1)",
|
||||
"groups": "Touchscreen",
|
||||
"action": "Movement",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "Delta With Button [Mouse]",
|
||||
"id": "5b4d4ebb-ae12-4d2b-9afd-775a415b6f22",
|
||||
"path": "DeltaWithButton",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Look",
|
||||
"isComposite": true,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "delta",
|
||||
"id": "86663e78-4aa9-4457-b52b-c329d0a127da",
|
||||
"path": "<Mouse>/delta",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Look",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "button",
|
||||
"id": "2e315c32-dc6c-405f-a97b-10a1de00cb80",
|
||||
"path": "<Mouse>/press",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Look",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "d23f9eb5-e32b-417b-8edf-d10cd6bdc1d3",
|
||||
"path": "<Gamepad>/rightStick",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Gamepad",
|
||||
"action": "Look",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "48bc601e-db29-4e46-8a0f-3698ec3025a4",
|
||||
"path": "<Touchscreen>/touch1/delta",
|
||||
"interactions": "",
|
||||
"processors": "ScaleVector2(x=0.1,y=0.1)",
|
||||
"groups": "Touchscreen",
|
||||
"action": "Look",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "2D Vector",
|
||||
"id": "e1df4888-ab33-4662-9a26-1427bb69166d",
|
||||
"path": "2DVector(mode=2)",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Look",
|
||||
"isComposite": true,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"id": "9e7a94a7-e078-4cb0-9129-d4201b3cc5af",
|
||||
"path": "<Gyroscope>/angularVelocity/y",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Look",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"id": "1f55665d-2075-44a5-a2ee-7ce59d934d2c",
|
||||
"path": "<Gyroscope>/angularVelocity/x",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Look",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "afb2c858-f0b0-4573-9bd7-3530d86fc6c1",
|
||||
"path": "<Keyboard>/u",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "ResetCamera",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "84140e5b-f829-4c16-b3c2-c07c437cba6b",
|
||||
"path": "<HandheldARInputDevice>/deviceRotation",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Rotate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "2b77688f-4e80-407c-8334-8ea75bfb47e6",
|
||||
"path": "<HandheldARInputDevice>/devicePosition",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Position",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "ba5cd7db-5c11-4519-b30c-5f2b5bf291ab",
|
||||
"path": "<Mouse>/position",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Point",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "d9fcd8cb-28b5-4414-b98d-f48b3e6a0e79",
|
||||
"path": "<Touchscreen>/touch0/position",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Touchscreen",
|
||||
"action": "Point",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "c15d3af8-9943-4dd5-af94-9aa5a5167c95",
|
||||
"path": "<Mouse>/leftButton",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Press",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "2d7822b8-e6e2-4aff-9e3e-733fcfa5dc6b",
|
||||
"path": "<Touchscreen>/touch*/Press",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Touchscreen",
|
||||
"action": "Press",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "b38c6b49-abda-4492-8ceb-d54d14b65e2f",
|
||||
"path": "<Keyboard>/anyKey",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "PressAnyKey",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Menu Controls",
|
||||
"id": "0914fb5b-51f6-4b26-9ed7-a3e72d065118",
|
||||
"actions": [
|
||||
{
|
||||
"name": "Navigate",
|
||||
"type": "PassThrough",
|
||||
"id": "538ffe95-ba92-4acb-84f7-314f6ac8e0a5",
|
||||
"expectedControlType": "Vector2",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Left Click",
|
||||
"type": "PassThrough",
|
||||
"id": "96c8be88-a7bb-4861-b5e9-956b4208d043",
|
||||
"expectedControlType": "Button",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Point",
|
||||
"type": "PassThrough",
|
||||
"id": "d54e5ff5-4f35-4d2f-a745-95d14aef8c43",
|
||||
"expectedControlType": "Vector2",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Submit",
|
||||
"type": "PassThrough",
|
||||
"id": "5f571f6a-e9e7-4120-ae3c-79f846bdd202",
|
||||
"expectedControlType": "Button",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Cancel",
|
||||
"type": "PassThrough",
|
||||
"id": "146e681c-77dd-4ff0-9ad5-f4351fea14cc",
|
||||
"expectedControlType": "Button",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "TogglePause",
|
||||
"type": "Button",
|
||||
"id": "e773b1f9-ce5b-4fa2-9c1f-d194202c43b7",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "Press",
|
||||
"initialStateCheck": false
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
{
|
||||
"name": "Gamepad Right Stick",
|
||||
"id": "c1491510-9d0f-47b0-868e-99575e46d097",
|
||||
"path": "2DVector",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Navigate",
|
||||
"isComposite": true,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"id": "57fb7217-68c1-483e-a15b-0fd1e5ab3fc3",
|
||||
"path": "<Gamepad>/leftStick/up",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Gamepad",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"id": "0c09243f-be8c-44a1-87c4-a0d3ca3a27a5",
|
||||
"path": "<Gamepad>/leftStick/down",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Gamepad",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"id": "a16b4641-1591-4d94-9fd4-e1eafd539931",
|
||||
"path": "<Gamepad>/leftStick/left",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Gamepad",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"id": "341f36e1-889b-4d62-834f-622378da658d",
|
||||
"path": "<Gamepad>/leftStick/right",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Gamepad",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "Gamepad Left Stick",
|
||||
"id": "c2c92ef2-a9d0-4393-86c7-4180acc16b6d",
|
||||
"path": "2DVector",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Navigate",
|
||||
"isComposite": true,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"id": "bed70561-f1cc-4c56-9715-66475aa6437f",
|
||||
"path": "<Gamepad>/leftStick/up",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Gamepad",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"id": "0005d032-151a-4ee0-8127-110d55e5ed9d",
|
||||
"path": "<Gamepad>/leftStick/down",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Gamepad",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"id": "84fcadd5-5853-4142-b3f9-58a5ab2ad788",
|
||||
"path": "<Gamepad>/leftStick/left",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Gamepad",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"id": "233f731d-8d73-4761-8879-66c0e0da124d",
|
||||
"path": "<Gamepad>/leftStick/right",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Gamepad",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "d687f18d-7559-488c-8542-e3da3a3dd1f7",
|
||||
"path": "<Gamepad>/dpad",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Gamepad",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "WASD Keys",
|
||||
"id": "c2a77ff0-1ce1-4c49-a4dd-94601087a2a2",
|
||||
"path": "2DVector",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Navigate",
|
||||
"isComposite": true,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"id": "a67b96dc-9151-496b-9be2-b4d65a82f52a",
|
||||
"path": "<Keyboard>/w",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"id": "4f8ac3a8-5653-4cf1-9687-259b7e6bfca4",
|
||||
"path": "<Keyboard>/s",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"id": "a3da140b-c504-4aea-9824-ffd10d44e52a",
|
||||
"path": "<Keyboard>/a",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"id": "d2cdc452-d127-4c2c-b57c-1f78e29cb425",
|
||||
"path": "<Keyboard>/d",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "Arrow Keys",
|
||||
"id": "c50ac654-ca86-486c-b427-057a0aacbb3b",
|
||||
"path": "2DVector",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Navigate",
|
||||
"isComposite": true,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"id": "80a43030-09a8-4324-b825-39a685b9a975",
|
||||
"path": "<Keyboard>/upArrow",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"id": "0284caff-9cfb-477f-901c-c6be4082785f",
|
||||
"path": "<Keyboard>/downArrow",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"id": "359d5348-82b3-4e60-9536-8c817495d31a",
|
||||
"path": "<Keyboard>/leftArrow",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"id": "b77717c3-b7e9-450f-8bc2-3aa284fac5cd",
|
||||
"path": "<Keyboard>/rightArrow",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "b5076a57-fe62-4632-8d6c-da0844960a14",
|
||||
"path": "<Mouse>/position",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Point",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "e7658a78-a141-4f0c-beb5-0a6a3e393c7b",
|
||||
"path": "<Touchscreen>/touch*/position",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Touchscreen",
|
||||
"action": "Point",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "dfac3b8e-d348-4a7a-b60b-14745c641340",
|
||||
"path": "<Keyboard>/p",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "TogglePause",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "f509a7b5-e79a-485e-ba2f-da5431d6fe4c",
|
||||
"path": "<Gamepad>/start",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Gamepad",
|
||||
"action": "TogglePause",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "6fee8919-99e7-4770-abd4-da1b7d4e4cc4",
|
||||
"path": "*/{Cancel}",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Cancel",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "14559c94-e8a7-426b-8687-fa5f1420a0c1",
|
||||
"path": "<Mouse>/leftButton",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Left Click",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "b35f103a-716c-4078-ad8d-66c5fb7fbb45",
|
||||
"path": "<Touchscreen>/touch*/press",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Touchscreen",
|
||||
"action": "Left Click",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "40b14102-9017-4522-862f-97d92a0da5f6",
|
||||
"path": "*/{Submit}",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Submit",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "c88534db-dffe-4245-85c8-f41ba53024a1",
|
||||
"path": "<Gamepad>/buttonSouth",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Submit",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"controlSchemes": [
|
||||
{
|
||||
"name": "Gamepad",
|
||||
"bindingGroup": "Gamepad",
|
||||
"devices": [
|
||||
{
|
||||
"devicePath": "<Gamepad>",
|
||||
"isOptional": false,
|
||||
"isOR": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Keyboard And Mouse",
|
||||
"bindingGroup": "Keyboard And Mouse",
|
||||
"devices": [
|
||||
{
|
||||
"devicePath": "<Keyboard>",
|
||||
"isOptional": false,
|
||||
"isOR": false
|
||||
},
|
||||
{
|
||||
"devicePath": "<Mouse>",
|
||||
"isOptional": false,
|
||||
"isOR": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Touchscreen",
|
||||
"bindingGroup": "Touchscreen",
|
||||
"devices": [
|
||||
{
|
||||
"devicePath": "<Touchscreen>",
|
||||
"isOptional": false,
|
||||
"isOR": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 73fc86559d71147b18ea5f2623204ede
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 8404be70184654265930450def6a9037, type: 3}
|
||||
generateWrapperCode: 0
|
||||
wrapperCodePath:
|
||||
wrapperClassName:
|
||||
wrapperCodeNamespace:
|
||||
@@ -1,40 +0,0 @@
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.InputSystem.LowLevel;
|
||||
|
||||
namespace Unity.RenderStreaming.Samples
|
||||
{
|
||||
using InputSystem = UnityEngine.InputSystem.InputSystem;
|
||||
|
||||
class CustomEventSystem : EventSystem
|
||||
{
|
||||
#if !INPUTSYSTEM_1_1_OR_NEWER
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
unsafe
|
||||
{
|
||||
InputSystem.onDeviceCommand += InputSystemOnDeviceCommand;
|
||||
}
|
||||
}
|
||||
|
||||
private static unsafe long? InputSystemOnDeviceCommand(InputDevice device, InputDeviceCommand* command)
|
||||
{
|
||||
if (command->type != QueryCanRunInBackground.Type)
|
||||
{
|
||||
// return null is skip this evaluation
|
||||
return null;
|
||||
}
|
||||
|
||||
((QueryCanRunInBackground*)command)->canRunInBackground = true;
|
||||
return InputDeviceCommand.GenericSuccess;
|
||||
}
|
||||
|
||||
protected override void OnApplicationFocus(bool hasFocus)
|
||||
{
|
||||
//Do not change focus flag on eventsystem
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8e5e9d986523743f2b5dd640a79541d4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,47 +0,0 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.InputSystem.Layouts;
|
||||
using UnityEngine.InputSystem.Utilities;
|
||||
using UnityEngine.Scripting;
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
#endif
|
||||
|
||||
namespace Unity.RenderStreaming.Samples
|
||||
{
|
||||
using InputSystem = UnityEngine.InputSystem.InputSystem;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
[InitializeOnLoad]
|
||||
#endif
|
||||
[Preserve]
|
||||
[DisplayStringFormat("{button}+{delta}")]
|
||||
class DeltaWithButton : InputBindingComposite<Vector2>
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
static DeltaWithButton()
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
#endif
|
||||
|
||||
[RuntimeInitializeOnLoadMethod]
|
||||
static void Initialize()
|
||||
{
|
||||
InputSystem.RegisterBindingComposite<DeltaWithButton>();
|
||||
}
|
||||
|
||||
[InputControl(layout = "Button")] public int delta;
|
||||
[InputControl(layout = "Button")] public int button;
|
||||
|
||||
public override Vector2 ReadValue(ref InputBindingCompositeContext context)
|
||||
{
|
||||
return context.ReadValueAsButton(button) ? context.ReadValue<Vector2, Vector2MagnitudeComparer>(delta) : default;
|
||||
}
|
||||
|
||||
public override float EvaluateMagnitude(ref InputBindingCompositeContext context)
|
||||
{
|
||||
return ReadValue(ref context).magnitude;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d0a0edcb6a384bcbbb60b5f93133bbc0
|
||||
timeCreated: 1635751612
|
||||
@@ -1,208 +0,0 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.InputSystem.EnhancedTouch;
|
||||
|
||||
namespace Unity.RenderStreaming.Samples
|
||||
{
|
||||
class SimpleCameraControllerV2 : MonoBehaviour
|
||||
{
|
||||
class CameraState
|
||||
{
|
||||
public float yaw;
|
||||
public float pitch;
|
||||
public float roll;
|
||||
public float x;
|
||||
public float y;
|
||||
public float z;
|
||||
|
||||
public void SetFromTransform(Transform t)
|
||||
{
|
||||
pitch = t.eulerAngles.x;
|
||||
yaw = t.eulerAngles.y;
|
||||
roll = t.eulerAngles.z;
|
||||
x = t.position.x;
|
||||
y = t.position.y;
|
||||
z = t.position.z;
|
||||
}
|
||||
|
||||
public void Translate(Vector3 translation)
|
||||
{
|
||||
Vector3 rotatedTranslation = Quaternion.Euler(pitch, yaw, roll) * translation;
|
||||
|
||||
x += rotatedTranslation.x;
|
||||
y += rotatedTranslation.y;
|
||||
z += rotatedTranslation.z;
|
||||
}
|
||||
|
||||
public void LerpTowards(CameraState target, float positionLerpPct, float rotationLerpPct)
|
||||
{
|
||||
yaw = Mathf.Lerp(yaw, target.yaw, rotationLerpPct);
|
||||
pitch = Mathf.Lerp(pitch, target.pitch, rotationLerpPct);
|
||||
roll = Mathf.Lerp(roll, target.roll, rotationLerpPct);
|
||||
|
||||
x = Mathf.Lerp(x, target.x, positionLerpPct);
|
||||
y = Mathf.Lerp(y, target.y, positionLerpPct);
|
||||
z = Mathf.Lerp(z, target.z, positionLerpPct);
|
||||
}
|
||||
|
||||
public void UpdateTransform(Transform t)
|
||||
{
|
||||
t.eulerAngles = new Vector3(pitch, yaw, roll);
|
||||
t.position = new Vector3(x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
[Header("Movement Settings"), Tooltip("Movement Sensitivity Factor."), Range(0.001f, 1f), SerializeField]
|
||||
private float movementSensitivityFactor = 0.1f;
|
||||
|
||||
[Tooltip("Exponential boost factor on translation, controllable by mouse wheel."), SerializeField]
|
||||
private float boost = 3.5f;
|
||||
|
||||
[Tooltip("Time it takes to interpolate camera position 99% of the way to the target."), Range(0.001f, 1f),
|
||||
SerializeField]
|
||||
private float positionLerpTime = 0.2f;
|
||||
|
||||
[Header("Rotation Settings"),
|
||||
Tooltip("X = Change in mouse position.\nY = Multiplicative factor for camera rotation."), SerializeField]
|
||||
private AnimationCurve mouseSensitivityCurve =
|
||||
new AnimationCurve(new Keyframe(0f, 0.5f, 0f, 5f), new Keyframe(1f, 2.5f, 0f, 0f));
|
||||
|
||||
[Tooltip("Time it takes to interpolate camera rotation 99% of the way to the target."), Range(0.001f, 1f),
|
||||
SerializeField]
|
||||
private float rotationLerpTime = 0.01f;
|
||||
|
||||
[Tooltip("Whether or not to invert our Y axis for mouse input to rotation."), SerializeField]
|
||||
private bool invertY;
|
||||
|
||||
[SerializeField] InputReceiver playerInput;
|
||||
|
||||
private readonly CameraState m_TargetCameraState = new CameraState();
|
||||
private readonly CameraState m_InterpolatingCameraState = new CameraState();
|
||||
private readonly CameraState m_InitialCameraState = new CameraState();
|
||||
|
||||
Vector2 inputMovement;
|
||||
Vector2 inputLook;
|
||||
|
||||
Vector3? inputPosition;
|
||||
Quaternion? inputRotation;
|
||||
|
||||
protected void Awake()
|
||||
{
|
||||
playerInput.onDeviceChange += OnDeviceChange;
|
||||
m_InitialCameraState.SetFromTransform(transform);
|
||||
|
||||
// Need to set enable the flag to receive touch screen event from mobile devices.
|
||||
EnhancedTouchSupport.Enable();
|
||||
}
|
||||
|
||||
void OnDeviceChange(InputDevice device, InputDeviceChange change)
|
||||
{
|
||||
switch (change)
|
||||
{
|
||||
case InputDeviceChange.Added:
|
||||
{
|
||||
playerInput.PerformPairingWithDevice(device);
|
||||
return;
|
||||
}
|
||||
case InputDeviceChange.Removed:
|
||||
{
|
||||
playerInput.UnpairDevices(device);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
m_TargetCameraState.SetFromTransform(transform);
|
||||
m_InterpolatingCameraState.SetFromTransform(transform);
|
||||
}
|
||||
|
||||
private void FixedUpdate()
|
||||
{
|
||||
// Tracked Device
|
||||
if (inputPosition.HasValue && inputRotation.HasValue)
|
||||
{
|
||||
transform.position = inputPosition.Value;
|
||||
transform.rotation = inputRotation.Value;
|
||||
return;
|
||||
}
|
||||
|
||||
UpdateTargetCameraStateDirection(inputMovement);
|
||||
UpdateTargetCameraStateFromInput(inputLook);
|
||||
|
||||
// Framerate-independent interpolation
|
||||
// Calculate the lerp amount, such that we get 99% of the way to our target in the specified time
|
||||
var positionLerpPct = 1f - Mathf.Exp((Mathf.Log(1f - 0.99f) / positionLerpTime) * Time.deltaTime);
|
||||
var rotationLerpPct = 1f - Mathf.Exp((Mathf.Log(1f - 0.99f) / rotationLerpTime) * Time.deltaTime);
|
||||
m_InterpolatingCameraState.LerpTowards(m_TargetCameraState, positionLerpPct, rotationLerpPct);
|
||||
m_InterpolatingCameraState.UpdateTransform(transform);
|
||||
}
|
||||
|
||||
|
||||
private void UpdateTargetCameraStateDirection(Vector2 input)
|
||||
{
|
||||
if (!invertY)
|
||||
{
|
||||
input.y *= -1;
|
||||
}
|
||||
|
||||
var translation = Vector3.right * input.x * movementSensitivityFactor;
|
||||
translation += Vector3.back * input.y * movementSensitivityFactor;
|
||||
translation *= Mathf.Pow(2.0f, boost);
|
||||
m_TargetCameraState.Translate(translation);
|
||||
}
|
||||
|
||||
private void UpdateTargetCameraStateFromInput(Vector2 input)
|
||||
{
|
||||
if (!invertY)
|
||||
{
|
||||
input.y *= -1;
|
||||
}
|
||||
|
||||
float mouseSensitivityFactor = mouseSensitivityCurve.Evaluate(input.magnitude);
|
||||
|
||||
m_TargetCameraState.yaw += input.x * mouseSensitivityFactor;
|
||||
m_TargetCameraState.pitch += input.y * mouseSensitivityFactor;
|
||||
}
|
||||
|
||||
public void OnControlsChanged()
|
||||
{
|
||||
}
|
||||
|
||||
public void OnDeviceLost()
|
||||
{
|
||||
}
|
||||
|
||||
public void OnDeviceRegained()
|
||||
{
|
||||
}
|
||||
|
||||
public void OnMovement(InputAction.CallbackContext context)
|
||||
{
|
||||
inputMovement = context.ReadValue<Vector2>();
|
||||
}
|
||||
|
||||
public void OnLook(InputAction.CallbackContext context)
|
||||
{
|
||||
inputLook = context.ReadValue<Vector2>();
|
||||
}
|
||||
|
||||
public void OnResetCamera(InputAction.CallbackContext context)
|
||||
{
|
||||
m_InitialCameraState.UpdateTransform(transform);
|
||||
m_TargetCameraState.SetFromTransform(transform);
|
||||
m_InterpolatingCameraState.SetFromTransform(transform);
|
||||
}
|
||||
|
||||
public void OnPosition(InputAction.CallbackContext context)
|
||||
{
|
||||
inputPosition = context.ReadValue<Vector3>();
|
||||
}
|
||||
|
||||
public void OnRotate(InputAction.CallbackContext context)
|
||||
{
|
||||
inputRotation = context.ReadValue<Quaternion>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 03310012c553840bc870f3fef5e88cd6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,79 +0,0 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Unity.RenderStreaming.Samples
|
||||
{
|
||||
[RequireComponent(typeof(RectTransform))]
|
||||
class UIControllerV2 : MonoBehaviour
|
||||
{
|
||||
[SerializeField] Text text;
|
||||
[SerializeField] CanvasGroup canvasGroup;
|
||||
[SerializeField] Image pointer;
|
||||
[SerializeField] GameObject noticeTouchControl;
|
||||
[SerializeField]
|
||||
private AnimationCurve transitionCurve =
|
||||
new AnimationCurve(
|
||||
new Keyframe(0.75f, 1f, 0f, 0f),
|
||||
new Keyframe(1f, 0f, 0f, 0f));
|
||||
|
||||
private float timeTransition = 0f;
|
||||
private RectTransform m_rectTransform = null;
|
||||
private bool isSubscribing = false;
|
||||
|
||||
|
||||
public void SetDevice(InputDevice device, bool add = false)
|
||||
{
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
m_rectTransform = GetComponent<RectTransform>();
|
||||
canvasGroup.alpha = 0;
|
||||
text.text = string.Empty;
|
||||
}
|
||||
|
||||
private void FixedUpdate()
|
||||
{
|
||||
if (!Mathf.Approximately(canvasGroup.alpha, 0f))
|
||||
{
|
||||
timeTransition += Time.deltaTime;
|
||||
canvasGroup.alpha = transitionCurve.Evaluate(timeTransition);
|
||||
}
|
||||
}
|
||||
|
||||
public void OnPressAnyKey(InputAction.CallbackContext context)
|
||||
{
|
||||
var keyboard = context.control.device as Keyboard;
|
||||
|
||||
if (!isSubscribing)
|
||||
{
|
||||
keyboard.onTextInput += OnTextInput;
|
||||
isSubscribing = true;
|
||||
}
|
||||
}
|
||||
|
||||
void OnTextInput(char c)
|
||||
{
|
||||
canvasGroup.alpha = 1f;
|
||||
text.text = c.ToString();
|
||||
timeTransition = 0;
|
||||
}
|
||||
|
||||
public void OnPoint(InputAction.CallbackContext context)
|
||||
{
|
||||
if (m_rectTransform == null)
|
||||
return;
|
||||
var position = context.ReadValue<Vector2>();
|
||||
var screenSize = new Vector2Int(Screen.width, Screen.height);
|
||||
position = position / screenSize * new Vector2(m_rectTransform.rect.width, m_rectTransform.rect.height);
|
||||
pointer.rectTransform.anchoredPosition = position;
|
||||
}
|
||||
|
||||
public void OnPress(InputAction.CallbackContext context)
|
||||
{
|
||||
var button = context.ReadValueAsButton();
|
||||
pointer.color = button ? Color.red : Color.clear;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0cf609b6c80ea492288c74dd8f26ae97
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6b0fd5663f9d63b4ea7d237df49bec6f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,40 +0,0 @@
|
||||
using UnityEditor;
|
||||
using UnityEditor.Build;
|
||||
using UnityEditor.Build.Reporting;
|
||||
#if UNITY_IOS
|
||||
using UnityEditor.iOS.Xcode;
|
||||
#endif
|
||||
|
||||
class PostProcess : IPostprocessBuildWithReport
|
||||
{
|
||||
public int callbackOrder { get { return 0; } }
|
||||
|
||||
public void OnPostprocessBuild(BuildReport report)
|
||||
{
|
||||
#if UNITY_IOS
|
||||
if (report.summary.platform == BuildTarget.iOS)
|
||||
{
|
||||
string projectPath = report.summary.outputPath + "/Unity-iPhone.xcodeproj/project.pbxproj";
|
||||
|
||||
PBXProject pbxProject = new PBXProject();
|
||||
pbxProject.ReadFromFile(projectPath);
|
||||
|
||||
//Disabling Bitcode on all targets
|
||||
|
||||
//Main
|
||||
string target = pbxProject.GetUnityMainTargetGuid();
|
||||
pbxProject.SetBuildProperty(target, "ENABLE_BITCODE", "NO");
|
||||
|
||||
//Unity Tests
|
||||
target = pbxProject.TargetGuidByName(PBXProject.GetUnityTestTargetName());
|
||||
pbxProject.SetBuildProperty(target, "ENABLE_BITCODE", "NO");
|
||||
|
||||
//Unity Framework
|
||||
target = pbxProject.GetUnityFrameworkTargetGuid();
|
||||
pbxProject.SetBuildProperty(target, "ENABLE_BITCODE", "NO");
|
||||
|
||||
pbxProject.WriteToFile(projectPath);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9a6fe6dcd54394a62ba7efc4d7352432
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,94 +0,0 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Unity.RenderStreaming.Editor;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
namespace Unity.RenderStreaming.Samples
|
||||
{
|
||||
[InitializeOnLoad]
|
||||
class SampleSetup
|
||||
{
|
||||
private const string kSavePath = "Library/RenderStreamingSampleSettings.json";
|
||||
private static string cacheGuid = "";
|
||||
|
||||
class DeleteSampleSettings : UnityEditor.AssetModificationProcessor
|
||||
{
|
||||
// When SampleSetup script is deleted, also delete RenderStreamingSampleSettings.json.
|
||||
private static AssetDeleteResult OnWillDeleteAsset(string assetPath, RemoveAssetOptions options)
|
||||
{
|
||||
var existPath = AssetDatabase.GUIDToAssetPath(cacheGuid);
|
||||
if (existPath.StartsWith(assetPath))
|
||||
{
|
||||
File.Delete(kSavePath);
|
||||
}
|
||||
|
||||
return AssetDeleteResult.DidNotDelete;
|
||||
}
|
||||
}
|
||||
|
||||
static SampleSetup()
|
||||
{
|
||||
cacheGuid = AssetDatabase.FindAssets($"t:Script {nameof(SampleSetup)}")[0];
|
||||
|
||||
Load();
|
||||
if (s_Settings.dialogAlreadyShowOnStartup || !RenderStreaming.AutomaticStreaming)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const string dialogText =
|
||||
"It is recommended to turn off AutomaticStreaming in the scenes included in the sample. Do you want to change the config assets for Sample?";
|
||||
if (EditorUtility.DisplayDialog("Warning", dialogText, "Change Settings", "Ignore"))
|
||||
{
|
||||
var guids = AssetDatabase.FindAssets("t:RenderStreamingSettings");
|
||||
var path = guids.Select(AssetDatabase.GUIDToAssetPath).First(x => x.EndsWith("RenderStreamingSample.asset"));
|
||||
var asset = AssetDatabase.LoadAssetAtPath<RenderStreamingSettings>(path);
|
||||
if (asset != null)
|
||||
{
|
||||
RenderStreamingEditor.SetRenderStreamingSettings(asset);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("RenderStreamingSample.asset not found.");
|
||||
}
|
||||
}
|
||||
|
||||
s_Settings.dialogAlreadyShowOnStartup = true;
|
||||
Save();
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
private struct SerializedState
|
||||
{
|
||||
public bool dialogAlreadyShowOnStartup;
|
||||
}
|
||||
|
||||
private static SerializedState s_Settings;
|
||||
|
||||
private static void Load()
|
||||
{
|
||||
s_Settings = new SerializedState();
|
||||
if (!File.Exists(kSavePath))
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
var json = File.ReadAllText(kSavePath);
|
||||
s_Settings = JsonUtility.FromJson<SerializedState>(json);
|
||||
}
|
||||
catch
|
||||
{
|
||||
s_Settings = new SerializedState();
|
||||
}
|
||||
}
|
||||
|
||||
private static void Save()
|
||||
{
|
||||
var json = JsonUtility.ToJson(s_Settings, prettyPrint: true);
|
||||
File.WriteAllText(kSavePath, json);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4f56783b5ff347029a1b5e685020003d
|
||||
timeCreated: 1675922966
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"name": "Unity.RenderStreaming.Sample.Editor",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:40a5acf76f04c4c8ebb69605e4b0d5c7",
|
||||
"GUID:7e479a0c97f111c48b6a279fad867f28"
|
||||
],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9a72d92d453fffa418a5baa1727f851e
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a514f33b3fd5d7344a88edcaa173d714
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0f1047eac14e2484cb08ee09c4ba53b0
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,92 +0,0 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.InputSystem.Controls;
|
||||
using UnityEngine.UI;
|
||||
using Gyroscope = UnityEngine.InputSystem.Gyroscope;
|
||||
|
||||
namespace Unity.RenderStreaming.Samples
|
||||
{
|
||||
using InputSystem = UnityEngine.InputSystem.InputSystem;
|
||||
|
||||
class GyroSample : MonoBehaviour
|
||||
{
|
||||
#pragma warning disable 0649
|
||||
[SerializeField] private SignalingManager renderStreaming;
|
||||
[SerializeField] private Button sendOfferButton;
|
||||
[SerializeField] private RawImage remoteVideoImage;
|
||||
[SerializeField] private VideoStreamReceiver receiveVideoViewer;
|
||||
[SerializeField] private SingleConnection connection;
|
||||
[SerializeField] private Text textVelocityX;
|
||||
[SerializeField] private Text textVelocityY;
|
||||
[SerializeField] private Text textVelocityZ;
|
||||
[SerializeField] private InputAction vector3Action;
|
||||
#pragma warning restore 0649
|
||||
private RenderStreamingSettings settings;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
if (Gyroscope.current != null)
|
||||
InputSystem.EnableDevice(Gyroscope.current);
|
||||
else
|
||||
Debug.LogError("Gyroscope is not supported on this device.");
|
||||
sendOfferButton.onClick.AddListener(SendOffer);
|
||||
receiveVideoViewer.OnUpdateReceiveTexture += texture => remoteVideoImage.texture = texture;
|
||||
|
||||
settings = SampleManager.Instance.Settings;
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
// Reset InputControl of Gyroscope surely.
|
||||
InputSystem.ResetDevice(Gyroscope.current, true);
|
||||
InputSystem.DisableDevice(Gyroscope.current);
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
if (renderStreaming.runOnAwake)
|
||||
return;
|
||||
if (settings != null)
|
||||
renderStreaming.useDefaultSettings = settings.UseDefaultSettings;
|
||||
if (settings?.SignalingSettings != null)
|
||||
renderStreaming.SetSignalingSettings(settings.SignalingSettings);
|
||||
renderStreaming.Run();
|
||||
}
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
vector3Action.Enable();
|
||||
vector3Action.performed += UpdateVector3;
|
||||
vector3Action.started += UpdateVector3;
|
||||
vector3Action.canceled += UpdateVector3;
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
vector3Action.Disable();
|
||||
vector3Action.performed -= UpdateVector3;
|
||||
vector3Action.started -= UpdateVector3;
|
||||
vector3Action.canceled -= UpdateVector3;
|
||||
}
|
||||
|
||||
private void UpdateVector3(InputAction.CallbackContext context)
|
||||
{
|
||||
if (context.control is Vector3Control control)
|
||||
{
|
||||
Vector3 value = control.ReadValue();
|
||||
textVelocityX.text = value.x.ToString("f2");
|
||||
textVelocityY.text = value.y.ToString("f2");
|
||||
textVelocityZ.text = value.z.ToString("f2");
|
||||
}
|
||||
}
|
||||
|
||||
void SendOffer()
|
||||
{
|
||||
if (settings != null)
|
||||
receiveVideoViewer.SetCodec(settings.ReceiverVideoCodec);
|
||||
|
||||
var connectionId = System.Guid.NewGuid().ToString("N");
|
||||
connection.CreateConnection(connectionId);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f8b53051b289a47f58fc4cd38c881aff
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c8962b69f3dcd61449dc20360068e0e8
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,264 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &4037113454067947823
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4037113454067947816}
|
||||
- component: {fileID: 4037113454067947818}
|
||||
- component: {fileID: 4037113454067947817}
|
||||
m_Layer: 5
|
||||
m_Name: Text
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4037113454067947816
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4037113454067947823}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4037113454666673381}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4037113454067947818
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4037113454067947823}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &4037113454067947817
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4037113454067947823}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 16
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 1
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: Back
|
||||
--- !u!1 &4037113454666673380
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4037113454666673381}
|
||||
- component: {fileID: 4037113454666673376}
|
||||
- component: {fileID: 4037113454666673383}
|
||||
- component: {fileID: 4037113454666673382}
|
||||
m_Layer: 5
|
||||
m_Name: Back
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &4037113454666673381
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4037113454666673380}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 4037113454067947816}
|
||||
m_Father: {fileID: 4037113455314838168}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: -20, y: -20}
|
||||
m_SizeDelta: {x: 80, y: 40}
|
||||
m_Pivot: {x: 1, y: 1}
|
||||
--- !u!222 &4037113454666673376
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4037113454666673380}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &4037113454666673383
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4037113454666673380}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &4037113454666673382
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4037113454666673380}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 4037113454666673383}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1347202893}
|
||||
m_TargetAssemblyTypeName: Unity.WebRTC.Samples.BackButton, Unity.WebRTC.Samples
|
||||
m_MethodName: BackButtonPressed
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
--- !u!1 &4037113455314838175
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4037113455314838168}
|
||||
- component: {fileID: 1347202893}
|
||||
m_Layer: 5
|
||||
m_Name: BackButtonManager
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4037113455314838168
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4037113455314838175}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 4037113454666673381}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 1, y: 1}
|
||||
--- !u!114 &1347202893
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4037113455314838175}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fdb45a16251639a4db94706f0e117a8a, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_BackButton: {fileID: 4037113454666673380}
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7aa5bec5b1e406445af144843fe4d62c
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f74260b9867fa524a9677fe64004f4f9
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: eea2ac6a1e4970e48b9a7ba939d8c6ad
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,21 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Unity.RenderStreaming.Samples
|
||||
{
|
||||
class FollowTransform : MonoBehaviour
|
||||
{
|
||||
[SerializeField] Transform target;
|
||||
[SerializeField] Vector3 offset;
|
||||
|
||||
[SerializeField] bool followPosition;
|
||||
[SerializeField] bool followRotation;
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (followPosition)
|
||||
transform.localPosition = target.localPosition + offset;
|
||||
if (followRotation)
|
||||
transform.localRotation = target.localRotation;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3a544a4313dfc22408b3cb83aa606d08
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,100 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &489449647258272010
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 489449647258272014}
|
||||
- component: {fileID: 489449647258272009}
|
||||
- component: {fileID: 2232263322929993776}
|
||||
- component: {fileID: 6766063150928624591}
|
||||
- component: {fileID: 1206473709398235252}
|
||||
m_Layer: 0
|
||||
m_Name: Guest
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &489449647258272014
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 489449647258272010}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &489449647258272009
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 489449647258272010}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4ae253ffca93b1b44a471a07cde60141, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
streams:
|
||||
- {fileID: 6766063150928624591}
|
||||
- {fileID: 2232263322929993776}
|
||||
- {fileID: 1206473709398235252}
|
||||
--- !u!114 &2232263322929993776
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 489449647258272010}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e6d9188eb6318c488077f3c88318a65, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
local: 1
|
||||
label:
|
||||
--- !u!114 &6766063150928624591
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 489449647258272010}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4872c2e12a0e07b498876d68f1e51143, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Codec:
|
||||
m_MimeType:
|
||||
m_SdpFmtpLine:
|
||||
m_RenderMode: 1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
--- !u!114 &1206473709398235252
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 489449647258272010}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 11af0c7644036f84bb5d375f2560b63f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
local: 1
|
||||
label:
|
||||
OnChangeLabel:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f99735f643c2ee344bba4094234fd984
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,46 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1593075550384854350
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 343366018105980846}
|
||||
- component: {fileID: 6663485387745853568}
|
||||
m_Layer: 0
|
||||
m_Name: Host
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &343366018105980846
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1593075550384854350}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &6663485387745853568
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1593075550384854350}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6691f6e876a4bdc4c9027880cd9d7966, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
prefab: {fileID: 489449647258272010, guid: 091348b4c72dfb741927d9544fc7fbbd, type: 3}
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a8d0903a5d0887a4c995401ef7832d6b
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,111 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Unity.RenderStreaming.Samples
|
||||
{
|
||||
class Multiplay : SignalingHandlerBase,
|
||||
IOfferHandler, IAddChannelHandler, IDisconnectHandler, IDeletedConnectionHandler
|
||||
{
|
||||
[SerializeField] GameObject prefab;
|
||||
|
||||
private List<string> connectionIds = new List<string>();
|
||||
private List<Component> streams = new List<Component>();
|
||||
private Dictionary<string, GameObject> dictObj = new Dictionary<string, GameObject>();
|
||||
|
||||
private RenderStreamingSettings settings;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
settings = SampleManager.Instance.Settings;
|
||||
}
|
||||
|
||||
public override IEnumerable<Component> Streams => streams;
|
||||
|
||||
public void OnDeletedConnection(SignalingEventData eventData)
|
||||
{
|
||||
Disconnect(eventData.connectionId);
|
||||
}
|
||||
|
||||
public void OnDisconnect(SignalingEventData eventData)
|
||||
{
|
||||
Disconnect(eventData.connectionId);
|
||||
}
|
||||
|
||||
private void Disconnect(string connectionId)
|
||||
{
|
||||
if (!connectionIds.Contains(connectionId))
|
||||
return;
|
||||
connectionIds.Remove(connectionId);
|
||||
|
||||
var obj = dictObj[connectionId];
|
||||
var sender = obj.GetComponentInChildren<StreamSenderBase>();
|
||||
var inputChannel = obj.GetComponentInChildren<InputReceiver>();
|
||||
var multiplayChannel = obj.GetComponentInChildren<MultiplayChannel>();
|
||||
|
||||
dictObj.Remove(connectionId);
|
||||
Object.Destroy(obj);
|
||||
|
||||
RemoveSender(connectionId, sender);
|
||||
RemoveChannel(connectionId, inputChannel);
|
||||
RemoveChannel(connectionId, multiplayChannel);
|
||||
|
||||
streams.Remove(sender);
|
||||
streams.Remove(inputChannel);
|
||||
streams.Remove(multiplayChannel);
|
||||
|
||||
if (ExistConnection(connectionId))
|
||||
DeleteConnection(connectionId);
|
||||
}
|
||||
|
||||
public void OnOffer(SignalingEventData data)
|
||||
{
|
||||
if (connectionIds.Contains(data.connectionId))
|
||||
{
|
||||
Debug.Log($"Already answered this connectionId : {data.connectionId}");
|
||||
return;
|
||||
}
|
||||
connectionIds.Add(data.connectionId);
|
||||
|
||||
var initialPosition = new Vector3(0, 3, 0);
|
||||
var newObj = Instantiate(prefab, initialPosition, Quaternion.identity);
|
||||
dictObj.Add(data.connectionId, newObj);
|
||||
|
||||
var sender = newObj.GetComponentInChildren<StreamSenderBase>();
|
||||
|
||||
if (sender is VideoStreamSender videoStreamSender && settings != null)
|
||||
{
|
||||
videoStreamSender.width = (uint)settings.StreamSize.x;
|
||||
videoStreamSender.height = (uint)settings.StreamSize.y;
|
||||
videoStreamSender.SetCodec(settings.SenderVideoCodec);
|
||||
}
|
||||
|
||||
var inputChannel = newObj.GetComponentInChildren<InputReceiver>();
|
||||
var multiplayChannel = newObj.GetComponentInChildren<MultiplayChannel>();
|
||||
var playerController = newObj.GetComponentInChildren<PlayerController>();
|
||||
|
||||
if (multiplayChannel.OnChangeLabel == null)
|
||||
multiplayChannel.OnChangeLabel = new ChangeLabelEvent();
|
||||
multiplayChannel.OnChangeLabel.AddListener(playerController.SetLabel);
|
||||
|
||||
streams.Add(sender);
|
||||
streams.Add(inputChannel);
|
||||
streams.Add(multiplayChannel);
|
||||
|
||||
AddSender(data.connectionId, sender);
|
||||
AddChannel(data.connectionId, inputChannel);
|
||||
AddChannel(data.connectionId, multiplayChannel);
|
||||
|
||||
SendAnswer(data.connectionId);
|
||||
}
|
||||
|
||||
/// todo(kazuki)::
|
||||
public void OnAddChannel(SignalingEventData data)
|
||||
{
|
||||
var obj = dictObj[data.connectionId];
|
||||
var channels = obj.GetComponentsInChildren<IDataChannel>();
|
||||
var channel = channels.FirstOrDefault(_ => !_.IsLocal && !_.IsConnected);
|
||||
channel?.SetChannel(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6691f6e876a4bdc4c9027880cd9d7966
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e807d14debe77b243882e9e5949c104d
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,54 +0,0 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
|
||||
namespace Unity.RenderStreaming.Samples
|
||||
{
|
||||
enum ActionType
|
||||
{
|
||||
ChangeLabel = 0,
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
class Message
|
||||
{
|
||||
public ActionType type;
|
||||
public string argument;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
class ChangeLabelEvent : UnityEvent<string> { };
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
class MultiplayChannel : DataChannelBase
|
||||
{
|
||||
public ChangeLabelEvent OnChangeLabel;
|
||||
|
||||
protected override void OnMessage(byte[] bytes)
|
||||
{
|
||||
string str = System.Text.Encoding.UTF8.GetString(bytes);
|
||||
var message = JsonUtility.FromJson<Message>(str);
|
||||
switch (message.type)
|
||||
{
|
||||
case ActionType.ChangeLabel:
|
||||
OnChangeLabel?.Invoke(message.argument);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public void ChangeLabel(string text)
|
||||
{
|
||||
var msg = new Message
|
||||
{
|
||||
type = ActionType.ChangeLabel,
|
||||
argument = text
|
||||
};
|
||||
Send(JsonUtility.ToJson(msg));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 11af0c7644036f84bb5d375f2560b63f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,132 +0,0 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Unity.RenderStreaming.Samples
|
||||
{
|
||||
class MultiplaySample : MonoBehaviour
|
||||
{
|
||||
[SerializeField] ToggleGroup toggleGroupRole;
|
||||
[SerializeField] InputField inputFieldUsername;
|
||||
[SerializeField] Button buttonStart;
|
||||
[SerializeField] SignalingManager renderStreaming;
|
||||
[SerializeField] GameObject prefabHost;
|
||||
[SerializeField] GameObject prefabGuest;
|
||||
[SerializeField] GameObject prefabPlayer;
|
||||
[SerializeField] GameObject menuCamera;
|
||||
[SerializeField] GameObject panel;
|
||||
[SerializeField] RawImage videoImage;
|
||||
[SerializeField] ShowStatsUI statsUI;
|
||||
|
||||
enum Role
|
||||
{
|
||||
Host = 0,
|
||||
Guest = 1
|
||||
}
|
||||
|
||||
private RenderStreamingSettings settings;
|
||||
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
settings = SampleManager.Instance.Settings;
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
buttonStart.onClick.AddListener(OnClickButtonStart);
|
||||
inputFieldUsername.text = UnityEngine.Random.Range(0, 99999).ToString("00000");
|
||||
inputFieldUsername.onValueChanged.AddListener(OnValueChangedUserName);
|
||||
}
|
||||
|
||||
void OnValueChangedUserName(string value)
|
||||
{
|
||||
bool hasNullValue =
|
||||
string.IsNullOrEmpty(inputFieldUsername.text);
|
||||
buttonStart.interactable = !hasNullValue;
|
||||
}
|
||||
|
||||
void OnClickButtonStart()
|
||||
{
|
||||
var username = inputFieldUsername.text;
|
||||
var connectionId = Guid.NewGuid().ToString();
|
||||
|
||||
var toggles = toggleGroupRole.GetComponentsInChildren<Toggle>();
|
||||
var activeToggle = toggleGroupRole.ActiveToggles().First();
|
||||
var indexRole = Array.FindIndex(toggles, _ => _ == activeToggle);
|
||||
var role = (Role)indexRole;
|
||||
|
||||
panel.SetActive(false);
|
||||
|
||||
switch (role)
|
||||
{
|
||||
case Role.Host:
|
||||
SetUpHost(username);
|
||||
break;
|
||||
case Role.Guest:
|
||||
StartCoroutine(SetUpGuest(username, connectionId));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void SetUpHost(string username)
|
||||
{
|
||||
menuCamera.SetActive(false);
|
||||
|
||||
var instance = GameObject.Instantiate(prefabHost);
|
||||
var handler = instance.GetComponent<Multiplay>();
|
||||
|
||||
// host player
|
||||
var hostPlayer = GameObject.Instantiate(prefabPlayer);
|
||||
var playerController = hostPlayer.GetComponent<PlayerController>();
|
||||
playerController.SetLabel(username);
|
||||
var playerInput = hostPlayer.GetComponent<InputReceiver>();
|
||||
playerInput.PerformPairingWithAllLocalDevices();
|
||||
playerController.CheckPairedDevices();
|
||||
|
||||
statsUI.AddSignalingHandler(handler);
|
||||
if (settings != null)
|
||||
renderStreaming.useDefaultSettings = settings.UseDefaultSettings;
|
||||
if (settings?.SignalingSettings != null)
|
||||
renderStreaming.SetSignalingSettings(settings.SignalingSettings);
|
||||
renderStreaming.Run(handlers: new SignalingHandlerBase[] { handler });
|
||||
}
|
||||
|
||||
IEnumerator SetUpGuest(string username, string connectionId)
|
||||
{
|
||||
var guestPlayer = GameObject.Instantiate(prefabGuest);
|
||||
var handler = guestPlayer.GetComponent<SingleConnection>();
|
||||
|
||||
statsUI.AddSignalingHandler(handler);
|
||||
if (settings != null)
|
||||
renderStreaming.useDefaultSettings = settings.UseDefaultSettings;
|
||||
if (settings?.SignalingSettings != null)
|
||||
renderStreaming.SetSignalingSettings(settings.SignalingSettings);
|
||||
renderStreaming.Run(handlers: new SignalingHandlerBase[] { handler });
|
||||
|
||||
videoImage.gameObject.SetActive(true);
|
||||
var receiveVideoViewer = guestPlayer.GetComponent<VideoStreamReceiver>();
|
||||
receiveVideoViewer.OnUpdateReceiveTexture += texture => videoImage.texture = texture;
|
||||
|
||||
var channel = guestPlayer.GetComponent<MultiplayChannel>();
|
||||
channel.OnStartedChannel += _ => { StartCoroutine(ChangeLabel(channel, username)); };
|
||||
|
||||
if (settings != null)
|
||||
receiveVideoViewer.SetCodec(settings.ReceiverVideoCodec);
|
||||
|
||||
// todo(kazuki):
|
||||
yield return new WaitForSeconds(1f);
|
||||
|
||||
handler.CreateConnection(connectionId);
|
||||
yield return new WaitUntil(() => handler.IsConnected(connectionId));
|
||||
}
|
||||
|
||||
IEnumerator ChangeLabel(MultiplayChannel channel, string username)
|
||||
{
|
||||
yield return new WaitUntil(() => channel.IsConnected);
|
||||
channel.ChangeLabel(username);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 02f858617dfc2544ea1f1762ed1b2d67
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,636 +0,0 @@
|
||||
{
|
||||
"name": "Player",
|
||||
"maps": [
|
||||
{
|
||||
"name": "Player Controls",
|
||||
"id": "cb4067f3-a685-4c86-b9ea-46a6eabfada7",
|
||||
"actions": [
|
||||
{
|
||||
"name": "Movement",
|
||||
"type": "Value",
|
||||
"id": "548e32fd-77d1-40e5-8197-32ca56b41bc0",
|
||||
"expectedControlType": "Vector2",
|
||||
"processors": "",
|
||||
"interactions": ""
|
||||
},
|
||||
{
|
||||
"name": "Look",
|
||||
"type": "Value",
|
||||
"id": "8ebbde1f-3044-41bc-bdac-430e0eae1a68",
|
||||
"expectedControlType": "Vector2",
|
||||
"processors": "",
|
||||
"interactions": ""
|
||||
},
|
||||
{
|
||||
"name": "Jump",
|
||||
"type": "Button",
|
||||
"id": "10fecf58-9483-40e0-ae20-15c8d01a4288",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "Press"
|
||||
},
|
||||
{
|
||||
"name": "TogglePause",
|
||||
"type": "Button",
|
||||
"id": "a70a208e-b491-4921-b460-a0144030ef2a",
|
||||
"expectedControlType": "Button",
|
||||
"processors": "",
|
||||
"interactions": "Press"
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
{
|
||||
"name": "WASD",
|
||||
"id": "99258992-afbc-4513-a4ee-24146566e341",
|
||||
"path": "2DVector",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Movement",
|
||||
"isComposite": true,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"id": "d57e0987-ea9f-4b18-9042-239931d4c060",
|
||||
"path": "<Keyboard>/w",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Movement",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"id": "75168890-922f-4122-9968-1ecac0f33c28",
|
||||
"path": "<Keyboard>/s",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Movement",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"id": "54b99838-0c45-421e-af38-b1f25b3f6927",
|
||||
"path": "<Keyboard>/a",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Movement",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"id": "77680fb0-0b9d-4a74-97de-9e3149ad6526",
|
||||
"path": "<Keyboard>/d",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Movement",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "df04a4e1-fc36-4ebd-b050-536736220da7",
|
||||
"path": "<Gamepad>/leftStick",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Gamepad",
|
||||
"action": "Movement",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "be6b2b51-d13a-4040-bb92-a825e7d4f764",
|
||||
"path": "<Touchscreen>/primaryTouch/delta",
|
||||
"interactions": "",
|
||||
"processors": "ScaleVector2(x=0.3,y=0.3)",
|
||||
"groups": "Touchscreen",
|
||||
"action": "Movement",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "42716e15-291c-4c71-8ded-0d03279959df",
|
||||
"path": "<Keyboard>/p",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "TogglePause",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "7bc14fbd-1107-4761-aa6f-b3367d7705e6",
|
||||
"path": "<Gamepad>/start",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "TogglePause",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "b12426a0-38ab-4d90-95e0-6840fcd30db6",
|
||||
"path": "<Keyboard>/space",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Jump",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "3e6d6425-a990-4434-b58d-57464db363d4",
|
||||
"path": "<Gamepad>/buttonSouth",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Gamepad",
|
||||
"action": "Jump",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "faa12d77-e42c-4d9f-9871-56381a35ba8f",
|
||||
"path": "<Touchscreen>/primaryTouch/tap",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Touchscreen",
|
||||
"action": "Jump",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "43d1488b-4ff2-4456-b1bf-a368a70fb680",
|
||||
"path": "<Mouse>/delta",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Look",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "d23f9eb5-e32b-417b-8edf-d10cd6bdc1d3",
|
||||
"path": "<Gamepad>/rightStick",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Gamepad",
|
||||
"action": "Look",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "48bc601e-db29-4e46-8a0f-3698ec3025a4",
|
||||
"path": "<Touchscreen>/touch1/delta",
|
||||
"interactions": "",
|
||||
"processors": "ScaleVector2(x=0.3,y=0.3)",
|
||||
"groups": "Touchscreen",
|
||||
"action": "Look",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Menu Controls",
|
||||
"id": "0914fb5b-51f6-4b26-9ed7-a3e72d065118",
|
||||
"actions": [
|
||||
{
|
||||
"name": "Navigate",
|
||||
"type": "PassThrough",
|
||||
"id": "538ffe95-ba92-4acb-84f7-314f6ac8e0a5",
|
||||
"expectedControlType": "Vector2",
|
||||
"processors": "",
|
||||
"interactions": ""
|
||||
},
|
||||
{
|
||||
"name": "Left Click",
|
||||
"type": "PassThrough",
|
||||
"id": "96c8be88-a7bb-4861-b5e9-956b4208d043",
|
||||
"expectedControlType": "Button",
|
||||
"processors": "",
|
||||
"interactions": ""
|
||||
},
|
||||
{
|
||||
"name": "Point",
|
||||
"type": "PassThrough",
|
||||
"id": "d54e5ff5-4f35-4d2f-a745-95d14aef8c43",
|
||||
"expectedControlType": "Vector2",
|
||||
"processors": "",
|
||||
"interactions": ""
|
||||
},
|
||||
{
|
||||
"name": "Submit",
|
||||
"type": "PassThrough",
|
||||
"id": "5f571f6a-e9e7-4120-ae3c-79f846bdd202",
|
||||
"expectedControlType": "Button",
|
||||
"processors": "",
|
||||
"interactions": ""
|
||||
},
|
||||
{
|
||||
"name": "Cancel",
|
||||
"type": "PassThrough",
|
||||
"id": "146e681c-77dd-4ff0-9ad5-f4351fea14cc",
|
||||
"expectedControlType": "Button",
|
||||
"processors": "",
|
||||
"interactions": ""
|
||||
},
|
||||
{
|
||||
"name": "TogglePause",
|
||||
"type": "Button",
|
||||
"id": "e773b1f9-ce5b-4fa2-9c1f-d194202c43b7",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "Press"
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
{
|
||||
"name": "Gamepad Right Stick",
|
||||
"id": "c1491510-9d0f-47b0-868e-99575e46d097",
|
||||
"path": "2DVector",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Navigate",
|
||||
"isComposite": true,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"id": "57fb7217-68c1-483e-a15b-0fd1e5ab3fc3",
|
||||
"path": "<Gamepad>/leftStick/up",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Gamepad",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"id": "0c09243f-be8c-44a1-87c4-a0d3ca3a27a5",
|
||||
"path": "<Gamepad>/leftStick/down",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Gamepad",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"id": "a16b4641-1591-4d94-9fd4-e1eafd539931",
|
||||
"path": "<Gamepad>/leftStick/left",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Gamepad",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"id": "341f36e1-889b-4d62-834f-622378da658d",
|
||||
"path": "<Gamepad>/leftStick/right",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Gamepad",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "Gamepad Left Stick",
|
||||
"id": "c2c92ef2-a9d0-4393-86c7-4180acc16b6d",
|
||||
"path": "2DVector",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Navigate",
|
||||
"isComposite": true,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"id": "bed70561-f1cc-4c56-9715-66475aa6437f",
|
||||
"path": "<Gamepad>/leftStick/up",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Gamepad",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"id": "0005d032-151a-4ee0-8127-110d55e5ed9d",
|
||||
"path": "<Gamepad>/leftStick/down",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Gamepad",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"id": "84fcadd5-5853-4142-b3f9-58a5ab2ad788",
|
||||
"path": "<Gamepad>/leftStick/left",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Gamepad",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"id": "233f731d-8d73-4761-8879-66c0e0da124d",
|
||||
"path": "<Gamepad>/leftStick/right",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Gamepad",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "d687f18d-7559-488c-8542-e3da3a3dd1f7",
|
||||
"path": "<Gamepad>/dpad",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Gamepad",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "WASD Keys",
|
||||
"id": "c2a77ff0-1ce1-4c49-a4dd-94601087a2a2",
|
||||
"path": "2DVector",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Navigate",
|
||||
"isComposite": true,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"id": "a67b96dc-9151-496b-9be2-b4d65a82f52a",
|
||||
"path": "<Keyboard>/w",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"id": "4f8ac3a8-5653-4cf1-9687-259b7e6bfca4",
|
||||
"path": "<Keyboard>/s",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"id": "a3da140b-c504-4aea-9824-ffd10d44e52a",
|
||||
"path": "<Keyboard>/a",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"id": "d2cdc452-d127-4c2c-b57c-1f78e29cb425",
|
||||
"path": "<Keyboard>/d",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "Arrow Keys",
|
||||
"id": "c50ac654-ca86-486c-b427-057a0aacbb3b",
|
||||
"path": "2DVector",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Navigate",
|
||||
"isComposite": true,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"id": "80a43030-09a8-4324-b825-39a685b9a975",
|
||||
"path": "<Keyboard>/upArrow",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"id": "0284caff-9cfb-477f-901c-c6be4082785f",
|
||||
"path": "<Keyboard>/downArrow",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"id": "359d5348-82b3-4e60-9536-8c817495d31a",
|
||||
"path": "<Keyboard>/leftArrow",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"id": "b77717c3-b7e9-450f-8bc2-3aa284fac5cd",
|
||||
"path": "<Keyboard>/rightArrow",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "b5076a57-fe62-4632-8d6c-da0844960a14",
|
||||
"path": "<Mouse>/position",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Point",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "e7658a78-a141-4f0c-beb5-0a6a3e393c7b",
|
||||
"path": "<Touchscreen>/touch*/position",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Touchscreen",
|
||||
"action": "Point",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "dfac3b8e-d348-4a7a-b60b-14745c641340",
|
||||
"path": "<Keyboard>/p",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "TogglePause",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "f509a7b5-e79a-485e-ba2f-da5431d6fe4c",
|
||||
"path": "<Gamepad>/start",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Gamepad",
|
||||
"action": "TogglePause",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "6fee8919-99e7-4770-abd4-da1b7d4e4cc4",
|
||||
"path": "*/{Cancel}",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Cancel",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "14559c94-e8a7-426b-8687-fa5f1420a0c1",
|
||||
"path": "<Mouse>/leftButton",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard And Mouse",
|
||||
"action": "Left Click",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "b35f103a-716c-4078-ad8d-66c5fb7fbb45",
|
||||
"path": "<Touchscreen>/touch*/press",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Touchscreen",
|
||||
"action": "Left Click",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "40b14102-9017-4522-862f-97d92a0da5f6",
|
||||
"path": "*/{Submit}",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Submit",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "c88534db-dffe-4245-85c8-f41ba53024a1",
|
||||
"path": "<Gamepad>/buttonSouth",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Submit",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"controlSchemes": [
|
||||
{
|
||||
"name": "Gamepad",
|
||||
"bindingGroup": "Gamepad",
|
||||
"devices": [
|
||||
{
|
||||
"devicePath": "<Gamepad>",
|
||||
"isOptional": false,
|
||||
"isOR": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Keyboard And Mouse",
|
||||
"bindingGroup": "Keyboard And Mouse",
|
||||
"devices": [
|
||||
{
|
||||
"devicePath": "<Keyboard>",
|
||||
"isOptional": false,
|
||||
"isOR": false
|
||||
},
|
||||
{
|
||||
"devicePath": "<Mouse>",
|
||||
"isOptional": false,
|
||||
"isOR": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Touchscreen",
|
||||
"bindingGroup": "Touchscreen",
|
||||
"devices": [
|
||||
{
|
||||
"devicePath": "<Touchscreen>",
|
||||
"isOptional": false,
|
||||
"isOR": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8c0e401c9f7f88d43b8650b1b972f45f
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 8404be70184654265930450def6a9037, type: 3}
|
||||
generateWrapperCode: 0
|
||||
wrapperCodePath:
|
||||
wrapperClassName:
|
||||
wrapperCodeNamespace:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 091348b4c72dfb741927d9544fc7fbbd
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,133 +0,0 @@
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace Unity.RenderStreaming.Samples
|
||||
{
|
||||
class PlayerController : MonoBehaviour
|
||||
{
|
||||
[SerializeField] GameObject player;
|
||||
[SerializeField] GameObject cameraPivot;
|
||||
[SerializeField] InputReceiver playerInput;
|
||||
[SerializeField] TextMesh label;
|
||||
[SerializeField] GameObject captionForMobile;
|
||||
[SerializeField] GameObject captionForDesktop;
|
||||
|
||||
[SerializeField] float moveSpeed = 100f;
|
||||
[SerializeField] float rotateSpeed = 10f;
|
||||
[SerializeField] float jumpSpeed = 500f;
|
||||
|
||||
const float CooldownJump = 1.2f; // second
|
||||
|
||||
Vector2 inputMovement;
|
||||
Vector2 inputLook;
|
||||
Vector3 initialPosition;
|
||||
bool inputJump;
|
||||
float cooldownJumpDelta = CooldownJump;
|
||||
|
||||
protected void Awake()
|
||||
{
|
||||
playerInput.onDeviceChange += OnDeviceChange;
|
||||
initialPosition = transform.position;
|
||||
}
|
||||
|
||||
void OnDeviceChange(InputDevice device, InputDeviceChange change)
|
||||
{
|
||||
switch (change)
|
||||
{
|
||||
case InputDeviceChange.Added:
|
||||
{
|
||||
playerInput.PerformPairingWithDevice(device);
|
||||
CheckPairedDevices();
|
||||
return;
|
||||
}
|
||||
case InputDeviceChange.Removed:
|
||||
{
|
||||
playerInput.UnpairDevices(device);
|
||||
CheckPairedDevices();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void CheckPairedDevices()
|
||||
{
|
||||
if (!playerInput.user.valid)
|
||||
return;
|
||||
|
||||
bool hasTouchscreenDevice =
|
||||
playerInput.user.pairedDevices.Count(_ => _.path.Contains("Touchscreen")) > 0;
|
||||
|
||||
captionForMobile.SetActive(hasTouchscreenDevice);
|
||||
captionForDesktop.SetActive(!hasTouchscreenDevice);
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
var forwardDirection = Quaternion.Euler(0, cameraPivot.transform.eulerAngles.y, 0);
|
||||
var moveForward = forwardDirection * new Vector3(inputMovement.x, 0, inputMovement.y);
|
||||
player.GetComponent<Rigidbody>().AddForce(moveForward * Time.deltaTime * moveSpeed);
|
||||
|
||||
var moveAngles = new Vector3(-inputLook.y, inputLook.x);
|
||||
var newAngles = cameraPivot.transform.localEulerAngles + moveAngles * Time.deltaTime * rotateSpeed;
|
||||
cameraPivot.transform.localEulerAngles = new Vector3(Mathf.Clamp(newAngles.x, 0, 45), newAngles.y, 0);
|
||||
|
||||
if (inputJump && cooldownJumpDelta <= 0.0f)
|
||||
{
|
||||
var jumpForward = forwardDirection * new Vector3(0, 1f, 0);
|
||||
player.GetComponent<Rigidbody>().AddForce(jumpForward * jumpSpeed);
|
||||
|
||||
cooldownJumpDelta = CooldownJump;
|
||||
}
|
||||
// jump cooldown
|
||||
if (cooldownJumpDelta >= 0.0f)
|
||||
{
|
||||
inputJump = false;
|
||||
cooldownJumpDelta -= Time.deltaTime;
|
||||
}
|
||||
|
||||
|
||||
// reset if the ball fall down from the floor
|
||||
if (player.transform.position.y < -5)
|
||||
{
|
||||
player.transform.position = initialPosition;
|
||||
player.GetComponent<Rigidbody>().velocity = Vector3.zero;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetLabel(string text)
|
||||
{
|
||||
label.text = text;
|
||||
}
|
||||
|
||||
public void OnControlsChanged()
|
||||
{
|
||||
}
|
||||
|
||||
public void OnDeviceLost()
|
||||
{
|
||||
}
|
||||
|
||||
public void OnDeviceRegained()
|
||||
{
|
||||
}
|
||||
|
||||
public void OnMovement(InputAction.CallbackContext value)
|
||||
{
|
||||
inputMovement = value.ReadValue<Vector2>();
|
||||
}
|
||||
|
||||
public void OnLook(InputAction.CallbackContext value)
|
||||
{
|
||||
inputLook = value.ReadValue<Vector2>();
|
||||
}
|
||||
|
||||
public void OnJump(InputAction.CallbackContext value)
|
||||
{
|
||||
if (value.performed)
|
||||
{
|
||||
inputJump = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d8db48a86c216984492c52d1586282ca
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 386664b03f5274caca8e6c97d2c00242
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,102 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Unity.Collections;
|
||||
using UnityEngine;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace Unity.RenderStreaming.Samples
|
||||
{
|
||||
class AudioSpectrumView : MonoBehaviour
|
||||
{
|
||||
[SerializeField] AudioSource target;
|
||||
[SerializeField] LineRenderer line;
|
||||
[SerializeField] Color[] lineColors;
|
||||
[SerializeField] RectTransform rectTransform;
|
||||
[SerializeField] float xRatio = 1f;
|
||||
[SerializeField] float yRatio = 1f;
|
||||
|
||||
const int positionCount = 256;
|
||||
float[] spectrum = new float[2048];
|
||||
private AudioClip clip;
|
||||
|
||||
Vector3[] array;
|
||||
List<LineRenderer> lines = new List<LineRenderer>();
|
||||
|
||||
private Dictionary<AudioSpeakerMode, int> SpeakerModeToChannel = new Dictionary<AudioSpeakerMode, int>()
|
||||
{
|
||||
{AudioSpeakerMode.Mono, 1},
|
||||
{AudioSpeakerMode.Stereo, 2},
|
||||
{AudioSpeakerMode.Quad, 4},
|
||||
{AudioSpeakerMode.Surround, 5},
|
||||
{AudioSpeakerMode.Mode5point1, 6},
|
||||
{AudioSpeakerMode.Mode7point1, 8},
|
||||
};
|
||||
|
||||
void Start()
|
||||
{
|
||||
array = new Vector3[positionCount];
|
||||
|
||||
// This line object is used as a template.
|
||||
if (line.gameObject.activeInHierarchy)
|
||||
line.gameObject.SetActive(false);
|
||||
|
||||
AudioSettings.OnAudioConfigurationChanged += OnAudioConfigurationChanged;
|
||||
}
|
||||
|
||||
void OnAudioConfigurationChanged(bool deviceChanged)
|
||||
{
|
||||
// reset lines;
|
||||
clip = null;
|
||||
}
|
||||
|
||||
void ResetLines(int channelCount)
|
||||
{
|
||||
foreach (var line in lines)
|
||||
{
|
||||
Object.Destroy(line.gameObject);
|
||||
}
|
||||
lines.Clear();
|
||||
for (int i = 0; i < channelCount; i++)
|
||||
{
|
||||
var line_ = GameObject.Instantiate(line, line.transform.parent);
|
||||
line_.gameObject.SetActive(true);
|
||||
line_.positionCount = positionCount;
|
||||
line_.startColor = lineColors[i];
|
||||
line_.endColor = lineColors[i];
|
||||
lines.Add(line_);
|
||||
}
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (target.clip == null)
|
||||
{
|
||||
if (lines.Count > 0)
|
||||
ResetLines(0);
|
||||
clip = null;
|
||||
return;
|
||||
}
|
||||
|
||||
if (clip != target.clip)
|
||||
{
|
||||
clip = target.clip;
|
||||
int channelCount = clip.channels;
|
||||
var conf = AudioSettings.GetConfiguration();
|
||||
int maxChannelCount = SpeakerModeToChannel[conf.speakerMode];
|
||||
channelCount = Math.Min(channelCount, maxChannelCount);
|
||||
ResetLines(channelCount);
|
||||
}
|
||||
for (int lineIndex = 0; lineIndex < lines.Count; lineIndex++)
|
||||
{
|
||||
target.GetSpectrumData(spectrum, lineIndex, FFTWindow.Rectangular);
|
||||
for (int i = 1; i < array.Length; i++)
|
||||
{
|
||||
float x = rectTransform.rect.width * i / array.Length * xRatio;
|
||||
float y = rectTransform.rect.height * Mathf.Log(spectrum[i] + 1) * yRatio;
|
||||
array[i] = new Vector3(x, y, 0);
|
||||
}
|
||||
lines[lineIndex].SetPositions(array);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fca600486dff01449843d95ce65d4a89
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d6a3fc68a1f7c05429fd88cc859bfaa1
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,144 +0,0 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Unity.RenderStreaming.Samples
|
||||
{
|
||||
static class InputSenderExtension
|
||||
{
|
||||
public static (Rect, Vector2Int) GetRegionAndSize(this RawImage image)
|
||||
{
|
||||
// correct pointer position
|
||||
Vector3[] corners = new Vector3[4];
|
||||
image.rectTransform.GetWorldCorners(corners);
|
||||
Camera camera = image.canvas.worldCamera;
|
||||
var corner0 = RectTransformUtility.WorldToScreenPoint(camera, corners[0]);
|
||||
var corner2 = RectTransformUtility.WorldToScreenPoint(camera, corners[2]);
|
||||
var region = new Rect(
|
||||
corner0.x,
|
||||
corner0.y,
|
||||
corner2.x - corner0.x,
|
||||
corner2.y - corner0.y
|
||||
);
|
||||
|
||||
var size = new Vector2Int(image.texture.width, image.texture.height);
|
||||
return (region, size);
|
||||
}
|
||||
}
|
||||
|
||||
class ReceiverSample : MonoBehaviour
|
||||
{
|
||||
#pragma warning disable 0649
|
||||
[SerializeField] private SignalingManager renderStreaming;
|
||||
[SerializeField] private Button startButton;
|
||||
[SerializeField] private Button stopButton;
|
||||
[SerializeField] private InputField connectionIdInput;
|
||||
[SerializeField] private RawImage remoteVideoImage;
|
||||
[SerializeField] private AudioSource remoteAudioSource;
|
||||
[SerializeField] private VideoStreamReceiver receiveVideoViewer;
|
||||
[SerializeField] private AudioStreamReceiver receiveAudioViewer;
|
||||
[SerializeField] private SingleConnection connection;
|
||||
[SerializeField] private Text resolution;
|
||||
#pragma warning restore 0649
|
||||
|
||||
private string connectionId;
|
||||
private InputSender inputSender;
|
||||
private RenderStreamingSettings settings;
|
||||
private Vector2 lastSize;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
startButton.onClick.AddListener(OnStart);
|
||||
stopButton.onClick.AddListener(OnStop);
|
||||
if (connectionIdInput != null)
|
||||
connectionIdInput.onValueChanged.AddListener(input => connectionId = input);
|
||||
|
||||
receiveVideoViewer.OnUpdateReceiveTexture += OnUpdateReceiveTexture;
|
||||
receiveAudioViewer.OnUpdateReceiveAudioSource += source =>
|
||||
{
|
||||
source.loop = true;
|
||||
source.Play();
|
||||
};
|
||||
|
||||
inputSender = GetComponent<InputSender>();
|
||||
inputSender.OnStartedChannel += OnStartedChannel;
|
||||
|
||||
settings = SampleManager.Instance.Settings;
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
if (renderStreaming.runOnAwake)
|
||||
return;
|
||||
|
||||
if (settings != null)
|
||||
renderStreaming.useDefaultSettings = settings.UseDefaultSettings;
|
||||
if (settings?.SignalingSettings != null)
|
||||
renderStreaming.SetSignalingSettings(settings.SignalingSettings);
|
||||
renderStreaming.Run();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
// Call SetInputChange if window size is changed.
|
||||
var size = remoteVideoImage.rectTransform.sizeDelta;
|
||||
if (lastSize == size)
|
||||
return;
|
||||
lastSize = size;
|
||||
CalculateInputRegion();
|
||||
}
|
||||
|
||||
void OnUpdateReceiveTexture(Texture texture)
|
||||
{
|
||||
remoteVideoImage.texture = texture;
|
||||
CalculateInputRegion();
|
||||
}
|
||||
|
||||
void OnStartedChannel(string connectionId)
|
||||
{
|
||||
CalculateInputRegion();
|
||||
}
|
||||
|
||||
private void OnRectTransformDimensionsChange()
|
||||
{
|
||||
CalculateInputRegion();
|
||||
}
|
||||
|
||||
void CalculateInputRegion()
|
||||
{
|
||||
if (inputSender == null || !inputSender.IsConnected || remoteVideoImage.texture == null)
|
||||
return;
|
||||
var (region, size) = remoteVideoImage.GetRegionAndSize();
|
||||
resolution.text = $"{(int)region.width} x {(int)region.height}";
|
||||
inputSender.CalculateInputResion(region, size);
|
||||
inputSender.EnableInputPositionCorrection(true);
|
||||
}
|
||||
|
||||
private void OnStart()
|
||||
{
|
||||
if (string.IsNullOrEmpty(connectionId))
|
||||
{
|
||||
connectionId = System.Guid.NewGuid().ToString("N");
|
||||
connectionIdInput.text = connectionId;
|
||||
}
|
||||
connectionIdInput.interactable = false;
|
||||
if (settings != null)
|
||||
receiveVideoViewer.SetCodec(settings.ReceiverVideoCodec);
|
||||
receiveAudioViewer.targetAudioSource = remoteAudioSource;
|
||||
|
||||
connection.CreateConnection(connectionId);
|
||||
startButton.gameObject.SetActive(false);
|
||||
stopButton.gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
private void OnStop()
|
||||
{
|
||||
connection.DeleteConnection(connectionId);
|
||||
connectionId = String.Empty;
|
||||
connectionIdInput.text = String.Empty;
|
||||
connectionIdInput.interactable = true;
|
||||
startButton.gameObject.SetActive(true);
|
||||
stopButton.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 97627988cbc0b4b15aefdbed5cb090d0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8f6e658ca96729248a8c89d11b449dd8
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: deddfd81e18574baa8027a117704dfcb
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8d88625a729bef44d83b96cf883a2a2e
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,456 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0cf1dab834d4ec34195b920ea7bbf9ec, type: 3}
|
||||
m_Name: HDRenderPipelineAsset
|
||||
m_EditorClassIdentifier:
|
||||
m_Version: 18
|
||||
m_ObsoleteFrameSettings:
|
||||
overrides: 0
|
||||
enableShadow: 0
|
||||
enableContactShadows: 0
|
||||
enableShadowMask: 0
|
||||
enableSSR: 0
|
||||
enableSSAO: 0
|
||||
enableSubsurfaceScattering: 0
|
||||
enableTransmission: 0
|
||||
enableAtmosphericScattering: 0
|
||||
enableVolumetrics: 0
|
||||
enableReprojectionForVolumetrics: 0
|
||||
enableLightLayers: 0
|
||||
enableExposureControl: 1
|
||||
diffuseGlobalDimmer: 0
|
||||
specularGlobalDimmer: 0
|
||||
shaderLitMode: 0
|
||||
enableDepthPrepassWithDeferredRendering: 0
|
||||
enableTransparentPrepass: 0
|
||||
enableMotionVectors: 0
|
||||
enableObjectMotionVectors: 0
|
||||
enableDecals: 0
|
||||
enableRoughRefraction: 0
|
||||
enableTransparentPostpass: 0
|
||||
enableDistortion: 0
|
||||
enablePostprocess: 0
|
||||
enableOpaqueObjects: 0
|
||||
enableTransparentObjects: 0
|
||||
enableRealtimePlanarReflection: 0
|
||||
enableMSAA: 0
|
||||
enableAsyncCompute: 0
|
||||
runLightListAsync: 0
|
||||
runSSRAsync: 0
|
||||
runSSAOAsync: 0
|
||||
runContactShadowsAsync: 0
|
||||
runVolumeVoxelizationAsync: 0
|
||||
lightLoopSettings:
|
||||
overrides: 0
|
||||
enableDeferredTileAndCluster: 0
|
||||
enableComputeLightEvaluation: 0
|
||||
enableComputeLightVariants: 0
|
||||
enableComputeMaterialVariants: 0
|
||||
enableFptlForForwardOpaque: 0
|
||||
enableBigTilePrepass: 0
|
||||
isFptlEnabled: 0
|
||||
m_ObsoleteBakedOrCustomReflectionFrameSettings:
|
||||
overrides: 0
|
||||
enableShadow: 0
|
||||
enableContactShadows: 0
|
||||
enableShadowMask: 0
|
||||
enableSSR: 0
|
||||
enableSSAO: 0
|
||||
enableSubsurfaceScattering: 0
|
||||
enableTransmission: 0
|
||||
enableAtmosphericScattering: 0
|
||||
enableVolumetrics: 0
|
||||
enableReprojectionForVolumetrics: 0
|
||||
enableLightLayers: 0
|
||||
enableExposureControl: 1
|
||||
diffuseGlobalDimmer: 0
|
||||
specularGlobalDimmer: 0
|
||||
shaderLitMode: 0
|
||||
enableDepthPrepassWithDeferredRendering: 0
|
||||
enableTransparentPrepass: 0
|
||||
enableMotionVectors: 0
|
||||
enableObjectMotionVectors: 0
|
||||
enableDecals: 0
|
||||
enableRoughRefraction: 0
|
||||
enableTransparentPostpass: 0
|
||||
enableDistortion: 0
|
||||
enablePostprocess: 0
|
||||
enableOpaqueObjects: 0
|
||||
enableTransparentObjects: 0
|
||||
enableRealtimePlanarReflection: 0
|
||||
enableMSAA: 0
|
||||
enableAsyncCompute: 0
|
||||
runLightListAsync: 0
|
||||
runSSRAsync: 0
|
||||
runSSAOAsync: 0
|
||||
runContactShadowsAsync: 0
|
||||
runVolumeVoxelizationAsync: 0
|
||||
lightLoopSettings:
|
||||
overrides: 0
|
||||
enableDeferredTileAndCluster: 0
|
||||
enableComputeLightEvaluation: 0
|
||||
enableComputeLightVariants: 0
|
||||
enableComputeMaterialVariants: 0
|
||||
enableFptlForForwardOpaque: 0
|
||||
enableBigTilePrepass: 0
|
||||
isFptlEnabled: 0
|
||||
m_ObsoleteRealtimeReflectionFrameSettings:
|
||||
overrides: 0
|
||||
enableShadow: 0
|
||||
enableContactShadows: 0
|
||||
enableShadowMask: 0
|
||||
enableSSR: 0
|
||||
enableSSAO: 0
|
||||
enableSubsurfaceScattering: 0
|
||||
enableTransmission: 0
|
||||
enableAtmosphericScattering: 0
|
||||
enableVolumetrics: 0
|
||||
enableReprojectionForVolumetrics: 0
|
||||
enableLightLayers: 0
|
||||
enableExposureControl: 1
|
||||
diffuseGlobalDimmer: 0
|
||||
specularGlobalDimmer: 0
|
||||
shaderLitMode: 0
|
||||
enableDepthPrepassWithDeferredRendering: 0
|
||||
enableTransparentPrepass: 0
|
||||
enableMotionVectors: 0
|
||||
enableObjectMotionVectors: 0
|
||||
enableDecals: 0
|
||||
enableRoughRefraction: 0
|
||||
enableTransparentPostpass: 0
|
||||
enableDistortion: 0
|
||||
enablePostprocess: 0
|
||||
enableOpaqueObjects: 0
|
||||
enableTransparentObjects: 0
|
||||
enableRealtimePlanarReflection: 0
|
||||
enableMSAA: 0
|
||||
enableAsyncCompute: 0
|
||||
runLightListAsync: 0
|
||||
runSSRAsync: 0
|
||||
runSSAOAsync: 0
|
||||
runContactShadowsAsync: 0
|
||||
runVolumeVoxelizationAsync: 0
|
||||
lightLoopSettings:
|
||||
overrides: 0
|
||||
enableDeferredTileAndCluster: 0
|
||||
enableComputeLightEvaluation: 0
|
||||
enableComputeLightVariants: 0
|
||||
enableComputeMaterialVariants: 0
|
||||
enableFptlForForwardOpaque: 0
|
||||
enableBigTilePrepass: 0
|
||||
isFptlEnabled: 0
|
||||
m_RenderPipelineResources: {fileID: 11400000, guid: 3ce144cff5783da45aa5d4fdc2da14b7,
|
||||
type: 2}
|
||||
m_RenderPipelineRayTracingResources: {fileID: 0}
|
||||
m_DefaultVolumeProfile: {fileID: 11400000, guid: 1be1f5f2810951e4bb59207715c852cf,
|
||||
type: 2}
|
||||
m_LensAttenuation: 0
|
||||
m_UseRenderGraph: 1
|
||||
m_DefaultLookDevProfile: {fileID: 11400000, guid: 226f2835128e88447866567150b86845,
|
||||
type: 2}
|
||||
m_RenderingPathDefaultCameraFrameSettings:
|
||||
bitDatas:
|
||||
data1: 140649432285021
|
||||
data2: 4539628425463136280
|
||||
lodBias: 1
|
||||
lodBiasMode: 0
|
||||
lodBiasQualityLevel: 0
|
||||
maximumLODLevel: 0
|
||||
maximumLODLevelMode: 0
|
||||
maximumLODLevelQualityLevel: 0
|
||||
sssQualityMode: 0
|
||||
sssQualityLevel: 0
|
||||
sssCustomSampleBudget: 20
|
||||
materialQuality: 0
|
||||
m_RenderingPathDefaultBakedOrCustomReflectionFrameSettings:
|
||||
bitDatas:
|
||||
data1: 139708817506077
|
||||
data2: 4539628424389459992
|
||||
lodBias: 1
|
||||
lodBiasMode: 0
|
||||
lodBiasQualityLevel: 0
|
||||
maximumLODLevel: 0
|
||||
maximumLODLevelMode: 0
|
||||
maximumLODLevelQualityLevel: 0
|
||||
sssQualityMode: 0
|
||||
sssQualityLevel: 0
|
||||
sssCustomSampleBudget: 20
|
||||
materialQuality: 0
|
||||
m_RenderingPathDefaultRealtimeReflectionFrameSettings:
|
||||
bitDatas:
|
||||
data1: 140065159257885
|
||||
data2: 4539628424389459992
|
||||
lodBias: 1
|
||||
lodBiasMode: 0
|
||||
lodBiasQualityLevel: 0
|
||||
maximumLODLevel: 0
|
||||
maximumLODLevelMode: 0
|
||||
maximumLODLevelQualityLevel: 0
|
||||
sssQualityMode: 0
|
||||
sssQualityLevel: 0
|
||||
sssCustomSampleBudget: 20
|
||||
materialQuality: 0
|
||||
m_RenderPipelineSettings:
|
||||
supportShadowMask: 1
|
||||
supportSSR: 0
|
||||
supportSSRTransparent: 0
|
||||
supportSSAO: 1
|
||||
supportSSGI: 0
|
||||
supportSubsurfaceScattering: 1
|
||||
sssSampleBudget:
|
||||
m_Values: 140000002800000050000000
|
||||
m_SchemaId:
|
||||
m_Id: With3Levels
|
||||
supportVolumetrics: 1
|
||||
supportLightLayers: 0
|
||||
lightLayerName0: Light Layer default
|
||||
lightLayerName1: Light Layer 1
|
||||
lightLayerName2: Light Layer 2
|
||||
lightLayerName3: Light Layer 3
|
||||
lightLayerName4: Light Layer 4
|
||||
lightLayerName5: Light Layer 5
|
||||
lightLayerName6: Light Layer 6
|
||||
lightLayerName7: Light Layer 7
|
||||
supportDistortion: 1
|
||||
supportTransparentBackface: 1
|
||||
supportTransparentDepthPrepass: 1
|
||||
supportTransparentDepthPostpass: 1
|
||||
colorBufferFormat: 74
|
||||
supportCustomPass: 1
|
||||
customBufferFormat: 12
|
||||
supportedLitShaderMode: 2
|
||||
planarReflectionResolution:
|
||||
m_Values: 000100000004000000080000
|
||||
m_SchemaId:
|
||||
m_Id: With3Levels
|
||||
supportDecals: 1
|
||||
supportDecalLayers: 0
|
||||
decalLayerName0: Decal Layer default
|
||||
decalLayerName1: Decal Layer 1
|
||||
decalLayerName2: Decal Layer 2
|
||||
decalLayerName3: Decal Layer 3
|
||||
decalLayerName4: Decal Layer 4
|
||||
decalLayerName5: Decal Layer 5
|
||||
decalLayerName6: Decal Layer 6
|
||||
decalLayerName7: Decal Layer 7
|
||||
msaaSampleCount: 1
|
||||
supportMotionVectors: 1
|
||||
supportRuntimeDebugDisplay: 1
|
||||
supportRuntimeAOVAPI: 0
|
||||
supportDitheringCrossFade: 1
|
||||
supportTerrainHole: 0
|
||||
supportProbeVolume: 0
|
||||
supportRayTracing: 0
|
||||
supportedRayTracingMode: 3
|
||||
probeVolumeSettings:
|
||||
atlasResolution: 128
|
||||
atlasOctahedralDepthResolution: 2048
|
||||
lightLoopSettings:
|
||||
cookieAtlasSize: 512
|
||||
cookieFormat: 74
|
||||
cookieAtlasLastValidMip: 0
|
||||
cookieTexArraySize: 16
|
||||
planarReflectionAtlasSize: 4096
|
||||
reflectionProbeCacheSize: 64
|
||||
reflectionCubemapSize: 256
|
||||
reflectionCacheCompressed: 0
|
||||
reflectionProbeFormat: 74
|
||||
skyReflectionSize: 256
|
||||
skyLightingOverrideLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
supportFabricConvolution: 0
|
||||
maxDirectionalLightsOnScreen: 16
|
||||
maxPunctualLightsOnScreen: 512
|
||||
maxAreaLightsOnScreen: 64
|
||||
maxEnvLightsOnScreen: 64
|
||||
maxDecalsOnScreen: 512
|
||||
maxPlanarReflectionOnScreen: 16
|
||||
maxLightsPerClusterCell: 8
|
||||
hdShadowInitParams:
|
||||
maxShadowRequests: 128
|
||||
directionalShadowsDepthBits: 32
|
||||
shadowFilteringQuality: 0
|
||||
punctualLightShadowAtlas:
|
||||
shadowAtlasResolution: 4096
|
||||
shadowAtlasDepthBits: 32
|
||||
useDynamicViewportRescale: 1
|
||||
areaLightShadowAtlas:
|
||||
shadowAtlasResolution: 4096
|
||||
shadowAtlasDepthBits: 32
|
||||
useDynamicViewportRescale: 1
|
||||
cachedPunctualLightShadowAtlas: 2048
|
||||
cachedAreaLightShadowAtlas: 1024
|
||||
shadowResolutionDirectional:
|
||||
m_Values: 00010000000200000004000000080000
|
||||
m_SchemaId:
|
||||
m_Id: With4Levels
|
||||
shadowResolutionPunctual:
|
||||
m_Values: 00010000000200000004000000080000
|
||||
m_SchemaId:
|
||||
m_Id: With4Levels
|
||||
shadowResolutionArea:
|
||||
m_Values: 00010000000200000004000000080000
|
||||
m_SchemaId:
|
||||
m_Id: With4Levels
|
||||
maxDirectionalShadowMapResolution: 2048
|
||||
maxPunctualShadowMapResolution: 2048
|
||||
maxAreaShadowMapResolution: 2048
|
||||
supportScreenSpaceShadows: 0
|
||||
maxScreenSpaceShadowSlots: 4
|
||||
screenSpaceShadowBufferFormat: 48
|
||||
decalSettings:
|
||||
drawDistance: 1000
|
||||
atlasWidth: 4096
|
||||
atlasHeight: 4096
|
||||
perChannelMask: 0
|
||||
postProcessSettings:
|
||||
m_LutSize: 32
|
||||
lutFormat: 48
|
||||
bufferFormat: 74
|
||||
dynamicResolutionSettings:
|
||||
enabled: 0
|
||||
maxPercentage: 100
|
||||
minPercentage: 100
|
||||
dynResType: 0
|
||||
upsampleFilter: 1
|
||||
forceResolution: 0
|
||||
forcedPercentage: 100
|
||||
lowresTransparentSettings:
|
||||
enabled: 1
|
||||
checkerboardDepthBuffer: 1
|
||||
upsampleType: 1
|
||||
xrSettings:
|
||||
singlePass: 1
|
||||
occlusionMesh: 1
|
||||
cameraJitter: 0
|
||||
postProcessQualitySettings:
|
||||
NearBlurSampleCount: 030000000500000008000000
|
||||
NearBlurMaxRadius:
|
||||
- 2
|
||||
- 4
|
||||
- 7
|
||||
FarBlurSampleCount: 04000000070000000e000000
|
||||
FarBlurMaxRadius:
|
||||
- 5
|
||||
- 8
|
||||
- 13
|
||||
DoFResolution: 040000000200000001000000
|
||||
DoFHighQualityFiltering: 000101
|
||||
DoFPhysicallyBased: 000000
|
||||
MotionBlurSampleCount: 04000000080000000c000000
|
||||
BloomRes: 040000000200000002000000
|
||||
BloomHighQualityFiltering: 000101
|
||||
BloomHighQualityPrefiltering: 000001
|
||||
ChromaticAberrationMaxSamples: 03000000060000000c000000
|
||||
lightSettings:
|
||||
useContactShadow:
|
||||
m_Values:
|
||||
m_SchemaId:
|
||||
m_Id:
|
||||
maximumLODLevel:
|
||||
m_Values: 000000000000000000000000
|
||||
m_SchemaId:
|
||||
m_Id: With3Levels
|
||||
lodBias:
|
||||
m_Values:
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
m_SchemaId:
|
||||
m_Id: With3Levels
|
||||
lightingQualitySettings:
|
||||
AOStepCount: 040000000600000010000000
|
||||
AOFullRes: 000001
|
||||
AOMaximumRadiusPixels: 200000002800000050000000
|
||||
AOBilateralUpsample: 000101
|
||||
AODirectionCount: 010000000200000004000000
|
||||
ContactShadowSampleCount: 060000000a00000010000000
|
||||
SSRMaxRaySteps: 100000002000000040000000
|
||||
RTAORayLength:
|
||||
- 0.5
|
||||
- 3
|
||||
- 20
|
||||
RTAOSampleCount: 010000000200000008000000
|
||||
RTAODenoise: 010101
|
||||
RTAODenoiserRadius:
|
||||
- 0.25
|
||||
- 0.5
|
||||
- 0.65
|
||||
RTGIRayLength:
|
||||
- 50
|
||||
- 50
|
||||
- 50
|
||||
RTGIFullResolution: 000001
|
||||
RTGIClampValue:
|
||||
- 0.5
|
||||
- 0.8
|
||||
- 1.5
|
||||
RTGIUpScaleRadius: 040000000400000004000000
|
||||
RTGIDenoise: 010101
|
||||
RTGIHalfResDenoise: 010000
|
||||
RTGIDenoiserRadius:
|
||||
- 0.75
|
||||
- 0.5
|
||||
- 0.25
|
||||
RTGISecondDenoise: 010101
|
||||
RTGISecondDenoiserRadius:
|
||||
- 0
|
||||
- 0
|
||||
- 0
|
||||
RTRMinSmoothness:
|
||||
- 0.6
|
||||
- 0.4
|
||||
- 0
|
||||
RTRSmoothnessFadeStart:
|
||||
- 0.7
|
||||
- 0.5
|
||||
- 0
|
||||
RTRRayLength:
|
||||
- 50
|
||||
- 50
|
||||
- 50
|
||||
RTRClampValue:
|
||||
- 0.8
|
||||
- 1
|
||||
- 1.2
|
||||
RTRUpScaleRadius: 040000000400000003000000
|
||||
RTRFullResolution: 000001
|
||||
RTRDenoise: 010101
|
||||
RTRDenoiserRadius: 080000000c00000010000000
|
||||
Fog_ControlMode: 000000000000000000000000
|
||||
Fog_Budget:
|
||||
- 0.166
|
||||
- 0.33
|
||||
- 0.666
|
||||
Fog_DepthRatio:
|
||||
- 0.666
|
||||
- 0.666
|
||||
- 0.5
|
||||
allowShaderVariantStripping: 1
|
||||
enableSRPBatcher: 1
|
||||
shaderVariantLogLevel: 0
|
||||
availableMaterialQualityLevels: -1
|
||||
m_DefaultMaterialQualityLevel: 4
|
||||
diffusionProfileSettings: {fileID: 0}
|
||||
diffusionProfileSettingsList:
|
||||
- {fileID: 11400000, guid: ea2db870d6ddb3e4a9dfb32ab088dd93, type: 2}
|
||||
- {fileID: 11400000, guid: b44005ed530ab5146843cb7184a65550, type: 2}
|
||||
beforeTransparentCustomPostProcesses: []
|
||||
beforeTAACustomPostProcesses: []
|
||||
beforePostProcessCustomPostProcesses: []
|
||||
afterPostProcessCustomPostProcesses: []
|
||||
virtualTexturingSettings:
|
||||
streamingCpuCacheSizeInMegaBytes: 256
|
||||
streamingGpuCacheSettings:
|
||||
- format: 0
|
||||
sizeInMegaBytes: 128
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 128f29c392c6e4f4d8084c06f5f65789
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dcdb1f94d436eb946b47392c2fe7730d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,229 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-333041103338351378
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 9008a067f4d626c4d8bc4bc48f04bb89, type: 3}
|
||||
m_Name: AmbientOcclusion
|
||||
m_EditorClassIdentifier:
|
||||
active: 1
|
||||
m_AdvancedMode: 0
|
||||
intensity:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0.5
|
||||
min: 0
|
||||
max: 4
|
||||
thicknessModifier:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1
|
||||
min: 1
|
||||
max: 10
|
||||
directLightingStrength:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
min: 0
|
||||
max: 1
|
||||
noiseFilterTolerance:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
min: -8
|
||||
max: 0
|
||||
blurTolerance:
|
||||
m_OverrideState: 0
|
||||
m_Value: -4.6
|
||||
min: -8
|
||||
max: 1
|
||||
upsampleTolerance:
|
||||
m_OverrideState: 0
|
||||
m_Value: -12
|
||||
min: -12
|
||||
max: -1
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3}
|
||||
m_Name: DefaultPostprocessingSettings
|
||||
m_EditorClassIdentifier:
|
||||
components:
|
||||
- {fileID: 2926520594555130314}
|
||||
- {fileID: -333041103338351378}
|
||||
- {fileID: 4291193248687608038}
|
||||
- {fileID: 1591912495330335307}
|
||||
--- !u!114 &1591912495330335307
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2d08ce26990eb1a4a9177b860541e702, type: 3}
|
||||
m_Name: Exposure
|
||||
m_EditorClassIdentifier:
|
||||
active: 1
|
||||
m_AdvancedMode: 0
|
||||
mode:
|
||||
m_OverrideState: 1
|
||||
m_Value: 1
|
||||
meteringMode:
|
||||
m_OverrideState: 0
|
||||
m_Value: 2
|
||||
luminanceSource:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1
|
||||
fixedExposure:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
compensation:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
limitMin:
|
||||
m_OverrideState: 0
|
||||
m_Value: -10
|
||||
limitMax:
|
||||
m_OverrideState: 0
|
||||
m_Value: 20
|
||||
curveMap:
|
||||
m_OverrideState: 0
|
||||
m_Value:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: -10
|
||||
value: -10
|
||||
inSlope: 0
|
||||
outSlope: 1
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
- serializedVersion: 3
|
||||
time: 20
|
||||
value: 20
|
||||
inSlope: 1
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
adaptationMode:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1
|
||||
adaptationSpeedDarkToLight:
|
||||
m_OverrideState: 0
|
||||
m_Value: 3
|
||||
min: 0.001
|
||||
adaptationSpeedLightToDark:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1
|
||||
min: 0.001
|
||||
--- !u!114 &2926520594555130314
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f086a068d4c5889438831b3ae9afc11c, type: 3}
|
||||
m_Name: Tonemapping
|
||||
m_EditorClassIdentifier:
|
||||
active: 1
|
||||
m_AdvancedMode: 0
|
||||
mode:
|
||||
m_OverrideState: 1
|
||||
m_Value: 2
|
||||
toeStrength:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
min: 0
|
||||
max: 1
|
||||
toeLength:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0.5
|
||||
min: 0
|
||||
max: 1
|
||||
shoulderStrength:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
min: 0
|
||||
max: 1
|
||||
shoulderLength:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0.5
|
||||
min: 0
|
||||
shoulderAngle:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
min: 0
|
||||
max: 1
|
||||
gamma:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1
|
||||
min: 0.001
|
||||
--- !u!114 &4291193248687608038
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 24f077503be6ae942a1e1245dbd53ea9, type: 3}
|
||||
m_Name: Bloom
|
||||
m_EditorClassIdentifier:
|
||||
active: 1
|
||||
m_AdvancedMode: 0
|
||||
intensity:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0.2
|
||||
min: 0
|
||||
max: 1
|
||||
scatter:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0.7
|
||||
min: 0
|
||||
max: 1
|
||||
tint:
|
||||
m_OverrideState: 0
|
||||
m_Value: {r: 1, g: 1, b: 1, a: 1}
|
||||
hdr: 0
|
||||
showAlpha: 0
|
||||
showEyeDropper: 1
|
||||
dirtTexture:
|
||||
m_OverrideState: 0
|
||||
m_Value: {fileID: 0}
|
||||
dirtIntensity:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
min: 0
|
||||
highQualityFiltering:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1
|
||||
resolution:
|
||||
m_OverrideState: 0
|
||||
m_Value: 2
|
||||
prefilter:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
anamorphic:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 92677ed6886ef03488c89897c876db53
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,281 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-7408721133138034335
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3df29e7cc05fbec4aa43e06ea875565d, type: 3}
|
||||
m_Name: ProceduralSky
|
||||
m_EditorClassIdentifier:
|
||||
active: 1
|
||||
m_AdvancedMode: 0
|
||||
rotation:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
min: 0
|
||||
max: 360
|
||||
skyIntensityMode:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
exposure:
|
||||
m_OverrideState: 1
|
||||
m_Value: 15
|
||||
multiplier:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1
|
||||
min: 0
|
||||
upperHemisphereLuxValue:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1
|
||||
min: 0
|
||||
desiredLuxValue:
|
||||
m_OverrideState: 0
|
||||
m_Value: 20000
|
||||
updateMode:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
updatePeriod:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
min: 0
|
||||
includeSunInBaking:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
sunSize:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0.04
|
||||
min: 0
|
||||
max: 1
|
||||
sunSizeConvergence:
|
||||
m_OverrideState: 0
|
||||
m_Value: 5
|
||||
min: 1
|
||||
max: 10
|
||||
atmosphereThickness:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1
|
||||
min: 0
|
||||
max: 5
|
||||
skyTint:
|
||||
m_OverrideState: 0
|
||||
m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
hdr: 0
|
||||
showAlpha: 1
|
||||
showEyeDropper: 1
|
||||
groundColor:
|
||||
m_OverrideState: 0
|
||||
m_Value: {r: 0.369, g: 0.349, b: 0.341, a: 1}
|
||||
hdr: 0
|
||||
showAlpha: 1
|
||||
showEyeDropper: 1
|
||||
enableSunDisk:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0
|
||||
--- !u!114 &-5636555292627806996
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 29b00527f85bb3346a4d2cb710971587, type: 3}
|
||||
m_Name: VolumetricFog
|
||||
m_EditorClassIdentifier:
|
||||
active: 1
|
||||
m_AdvancedMode: 0
|
||||
colorMode:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1
|
||||
color:
|
||||
m_OverrideState: 0
|
||||
m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
hdr: 1
|
||||
showAlpha: 0
|
||||
showEyeDropper: 1
|
||||
density:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1
|
||||
min: 0
|
||||
max: 1
|
||||
maxFogDistance:
|
||||
m_OverrideState: 0
|
||||
m_Value: 5000
|
||||
min: 0
|
||||
mipFogMaxMip:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0.5
|
||||
min: 0
|
||||
max: 1
|
||||
mipFogNear:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
min: 0
|
||||
mipFogFar:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1000
|
||||
min: 0
|
||||
albedo:
|
||||
m_OverrideState: 0
|
||||
m_Value: {r: 1, g: 1, b: 1, a: 1}
|
||||
hdr: 0
|
||||
showAlpha: 1
|
||||
showEyeDropper: 1
|
||||
meanFreePath:
|
||||
m_OverrideState: 1
|
||||
m_Value: 150
|
||||
min: 1
|
||||
baseHeight:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
meanHeight:
|
||||
m_OverrideState: 0
|
||||
m_Value: 10
|
||||
anisotropy:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0.65
|
||||
min: -1
|
||||
max: 1
|
||||
globalLightProbeDimmer:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1
|
||||
min: 0
|
||||
max: 1
|
||||
enableDistantFog:
|
||||
m_OverrideState: 1
|
||||
m_Value: 1
|
||||
--- !u!114 &-3748703256905937253
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 7ddcec8a8eb2d684d833ac8f5d26aebd, type: 3}
|
||||
m_Name: HDShadowSettings
|
||||
m_EditorClassIdentifier:
|
||||
active: 1
|
||||
m_AdvancedMode: 0
|
||||
maxShadowDistance:
|
||||
m_OverrideState: 1
|
||||
m_Value: 150
|
||||
min: 0
|
||||
cascadeShadowSplitCount:
|
||||
m_OverrideState: 0
|
||||
m_Value: 4
|
||||
min: 1
|
||||
max: 4
|
||||
cascadeShadowSplit0:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0.05
|
||||
cascadeShadowSplit1:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0.15
|
||||
cascadeShadowSplit2:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0.3
|
||||
cascadeShadowBorder0:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
cascadeShadowBorder1:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
cascadeShadowBorder2:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
cascadeShadowBorder3:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
--- !u!114 &-2962872181204505630
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0d7593b3a9277ac4696b20006c21dde2, type: 3}
|
||||
m_Name: VisualEnvironment
|
||||
m_EditorClassIdentifier:
|
||||
active: 1
|
||||
m_AdvancedMode: 0
|
||||
skyType:
|
||||
m_OverrideState: 1
|
||||
m_Value: 2
|
||||
skyAmbientMode:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
fogType:
|
||||
m_OverrideState: 1
|
||||
m_Value: 3
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3}
|
||||
m_Name: DefaultRenderingSettings
|
||||
m_EditorClassIdentifier:
|
||||
components:
|
||||
- {fileID: -3748703256905937253}
|
||||
- {fileID: -2962872181204505630}
|
||||
- {fileID: -7408721133138034335}
|
||||
- {fileID: -5636555292627806996}
|
||||
- {fileID: 6313922747869604399}
|
||||
--- !u!114 &6313922747869604399
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 9008a067f4d626c4d8bc4bc48f04bb89, type: 3}
|
||||
m_Name: AmbientOcclusion
|
||||
m_EditorClassIdentifier:
|
||||
active: 1
|
||||
m_AdvancedMode: 0
|
||||
intensity:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0.5
|
||||
min: 0
|
||||
max: 4
|
||||
thicknessModifier:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1
|
||||
min: 1
|
||||
max: 10
|
||||
directLightingStrength:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
min: 0
|
||||
max: 1
|
||||
noiseFilterTolerance:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
min: -8
|
||||
max: 0
|
||||
blurTolerance:
|
||||
m_OverrideState: 0
|
||||
m_Value: -4.6
|
||||
min: -8
|
||||
max: 1
|
||||
upsampleTolerance:
|
||||
m_OverrideState: 0
|
||||
m_Value: -12
|
||||
min: -12
|
||||
max: -1
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c5a6037baa6cca640b2fe8d4fa07fa6b
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,197 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-2109818796249167647
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 598e2d32e2c7b0c418e030c3236d663a, type: 3}
|
||||
m_Name: ChromaticAberration
|
||||
m_EditorClassIdentifier:
|
||||
active: 1
|
||||
m_AdvancedMode: 0
|
||||
quality:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1
|
||||
spectralLut:
|
||||
m_OverrideState: 0
|
||||
m_Value: {fileID: 0}
|
||||
intensity:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0.05
|
||||
min: 0
|
||||
max: 1
|
||||
m_MaxSamples:
|
||||
m_OverrideState: 0
|
||||
m_Value: 8
|
||||
min: 3
|
||||
max: 24
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3}
|
||||
m_Name: SampleScenePostProcessingSettings
|
||||
m_EditorClassIdentifier:
|
||||
components:
|
||||
- {fileID: 8711377374188185572}
|
||||
- {fileID: 3109681608999342120}
|
||||
- {fileID: 396278178000043239}
|
||||
- {fileID: -2109818796249167647}
|
||||
--- !u!114 &396278178000043239
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b51a78e223a2e504bb88a059b55229ea, type: 3}
|
||||
m_Name: WhiteBalance
|
||||
m_EditorClassIdentifier:
|
||||
active: 1
|
||||
m_AdvancedMode: 0
|
||||
temperature:
|
||||
m_OverrideState: 1
|
||||
m_Value: 20
|
||||
min: -100
|
||||
max: 100
|
||||
tint:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
min: -100
|
||||
max: 100
|
||||
--- !u!114 &3109681608999342120
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2d08ce26990eb1a4a9177b860541e702, type: 3}
|
||||
m_Name: Exposure
|
||||
m_EditorClassIdentifier:
|
||||
active: 1
|
||||
m_AdvancedMode: 0
|
||||
mode:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0
|
||||
meteringMode:
|
||||
m_OverrideState: 0
|
||||
m_Value: 2
|
||||
luminanceSource:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1
|
||||
fixedExposure:
|
||||
m_OverrideState: 1
|
||||
m_Value: 8.5
|
||||
compensation:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0.5
|
||||
limitMin:
|
||||
m_OverrideState: 0
|
||||
m_Value: -10
|
||||
limitMax:
|
||||
m_OverrideState: 0
|
||||
m_Value: 20
|
||||
curveMap:
|
||||
m_OverrideState: 0
|
||||
m_Value:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: -10
|
||||
value: -10
|
||||
inSlope: 0
|
||||
outSlope: 1
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
- serializedVersion: 3
|
||||
time: 20
|
||||
value: 20
|
||||
inSlope: 1
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
adaptationMode:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1
|
||||
adaptationSpeedDarkToLight:
|
||||
m_OverrideState: 0
|
||||
m_Value: 3
|
||||
min: 0.001
|
||||
adaptationSpeedLightToDark:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1
|
||||
min: 0.001
|
||||
--- !u!114 &8711377374188185572
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2c1be1b6c95cd2e41b27903b9270817f, type: 3}
|
||||
m_Name: Vignette
|
||||
m_EditorClassIdentifier:
|
||||
active: 1
|
||||
m_AdvancedMode: 0
|
||||
mode:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
color:
|
||||
m_OverrideState: 0
|
||||
m_Value: {r: 0, g: 0, b: 0, a: 1}
|
||||
hdr: 0
|
||||
showAlpha: 0
|
||||
showEyeDropper: 1
|
||||
center:
|
||||
m_OverrideState: 0
|
||||
m_Value: {x: 0.5, y: 0.5}
|
||||
intensity:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0.25
|
||||
min: 0
|
||||
max: 1
|
||||
smoothness:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0.2
|
||||
min: 0.01
|
||||
max: 1
|
||||
roundness:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1
|
||||
min: 0
|
||||
max: 1
|
||||
rounded:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
mask:
|
||||
m_OverrideState: 0
|
||||
m_Value: {fileID: 0}
|
||||
opacity:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1
|
||||
min: 0
|
||||
max: 1
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e4ad4d52956ef024f8c0689f9beee68c
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,195 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-5516019363565434250
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a81bcacc415a1f743bfdf703afc52027, type: 3}
|
||||
m_Name: GradientSky
|
||||
m_EditorClassIdentifier:
|
||||
active: 1
|
||||
m_AdvancedMode: 0
|
||||
rotation:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0
|
||||
min: 0
|
||||
max: 360
|
||||
skyIntensityMode:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0
|
||||
exposure:
|
||||
m_OverrideState: 1
|
||||
m_Value: 10
|
||||
multiplier:
|
||||
m_OverrideState: 1
|
||||
m_Value: 1
|
||||
min: 0
|
||||
upperHemisphereLuxValue:
|
||||
m_OverrideState: 1
|
||||
m_Value: 1
|
||||
min: 0
|
||||
upperHemisphereLuxColor:
|
||||
m_OverrideState: 1
|
||||
m_Value: {x: 0, y: 0, z: 0}
|
||||
desiredLuxValue:
|
||||
m_OverrideState: 1
|
||||
m_Value: 20000
|
||||
updateMode:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
updatePeriod:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0
|
||||
min: 0
|
||||
includeSunInBaking:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0
|
||||
top:
|
||||
m_OverrideState: 1
|
||||
m_Value: {r: 0, g: 0, b: 1, a: 1}
|
||||
hdr: 1
|
||||
showAlpha: 0
|
||||
showEyeDropper: 1
|
||||
middle:
|
||||
m_OverrideState: 1
|
||||
m_Value: {r: 0.3, g: 0.7, b: 1, a: 1}
|
||||
hdr: 1
|
||||
showAlpha: 0
|
||||
showEyeDropper: 1
|
||||
bottom:
|
||||
m_OverrideState: 1
|
||||
m_Value: {r: 1, g: 1, b: 1, a: 1}
|
||||
hdr: 1
|
||||
showAlpha: 0
|
||||
showEyeDropper: 1
|
||||
gradientDiffusion:
|
||||
m_OverrideState: 1
|
||||
m_Value: 1
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3}
|
||||
m_Name: SampleSceneSkyandFogSettings
|
||||
m_EditorClassIdentifier:
|
||||
components:
|
||||
- {fileID: 3912485203739470195}
|
||||
- {fileID: 5321722785694334585}
|
||||
- {fileID: -5516019363565434250}
|
||||
--- !u!114 &3912485203739470195
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0d7593b3a9277ac4696b20006c21dde2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
active: 1
|
||||
m_AdvancedMode: 0
|
||||
skyType:
|
||||
m_OverrideState: 1
|
||||
m_Value: 3
|
||||
skyAmbientMode:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
fogType:
|
||||
m_OverrideState: 1
|
||||
m_Value: 3
|
||||
--- !u!114 &5321722785694334585
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 953beb541740ddc499d005ee80c9ff29, type: 3}
|
||||
m_Name: Fog
|
||||
m_EditorClassIdentifier:
|
||||
active: 1
|
||||
m_AdvancedMode: 0
|
||||
enabled:
|
||||
m_OverrideState: 1
|
||||
m_Value: 1
|
||||
colorMode:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1
|
||||
color:
|
||||
m_OverrideState: 0
|
||||
m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
hdr: 1
|
||||
showAlpha: 0
|
||||
showEyeDropper: 1
|
||||
maxFogDistance:
|
||||
m_OverrideState: 0
|
||||
m_Value: 5000
|
||||
min: 0
|
||||
mipFogMaxMip:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0.5
|
||||
min: 0
|
||||
max: 1
|
||||
mipFogNear:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
min: 0
|
||||
mipFogFar:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1000
|
||||
min: 0
|
||||
baseHeight:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
maximumHeight:
|
||||
m_OverrideState: 0
|
||||
m_Value: 50
|
||||
albedo:
|
||||
m_OverrideState: 0
|
||||
m_Value: {r: 1, g: 1, b: 1, a: 1}
|
||||
hdr: 0
|
||||
showAlpha: 1
|
||||
showEyeDropper: 1
|
||||
meanFreePath:
|
||||
m_OverrideState: 1
|
||||
m_Value: 250
|
||||
min: 1
|
||||
enableVolumetricFog:
|
||||
m_OverrideState: 1
|
||||
m_Value: 1
|
||||
anisotropy:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0.6
|
||||
min: -1
|
||||
max: 1
|
||||
globalLightProbeDimmer:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1
|
||||
min: 0
|
||||
max: 1
|
||||
depthExtent:
|
||||
m_OverrideState: 0
|
||||
m_Value: 64
|
||||
min: 0.1
|
||||
sliceDistributionUniformity:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0.75
|
||||
min: 0
|
||||
max: 1
|
||||
filter:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b8450952a923d4c7486a092375804dd8
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9ba71b4f8eadb2740a4a24f873a5fa5c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2b331284c5daf97439b0d82a6761a0e6
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,133 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-1722350297517488288
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 7
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: DefaultURPMaterial
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: 2000
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 0
|
||||
- _Glossiness: 0
|
||||
- _GlossyReflections: 0
|
||||
- _Metallic: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.005
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
- _Color: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 95833e6631d7f03489d158ef6606b4dd
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,38 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3}
|
||||
m_Name: ForwardRenderer
|
||||
m_EditorClassIdentifier:
|
||||
m_RendererFeatures: []
|
||||
m_RendererFeatureMap:
|
||||
postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2}
|
||||
shaders:
|
||||
blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3}
|
||||
copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3}
|
||||
screenSpaceShadowPS: {fileID: 4800000, guid: 0f854b35a0cf61a429bd5dcfea30eddd,
|
||||
type: 3}
|
||||
samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3}
|
||||
fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3}
|
||||
m_OpaqueLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_TransparentLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_DefaultStencilState:
|
||||
overrideStencilState: 0
|
||||
stencilReference: 0
|
||||
stencilCompareFunction: 8
|
||||
passOperation: 0
|
||||
failOperation: 0
|
||||
zFailOperation: 0
|
||||
m_ShadowTransparentReceive: 1
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d9b55491880ac504eb925b8daba0cc98
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user