资源简介
VRTK3.1.0版本 ,配合steam vr plugin插件一起使用,结合U3D开发HTC游戏
代码片段和文件信息
#if (UNITY_5_4_OR_NEWER)
namespace VRTK
{
using System;
using System.Globalization;
using UnityEditor;
using UnityEngine;
[CustomEditor(typeof(VRTK_AdaptiveQuality))]
public class VRTK_AdaptiveQualityEditor : Editor
{
private const string DontDisableHelpBoxText =
“This script supports command line arguments to configure the adaptive quality scaling.“
+ “ If this script is disabled it won‘t respond to the arguments.\n\n“
+ “Leave this script enabled and use the ‘scaleRenderViewport‘ property if you want to disable“
+ “ the adaptive quality scaling for now but want to leave it possible for your built“
+ “ binary to respond to the arguments.“;
private const string MaximumRenderScaleTooBigHelpBoxText =
“The maximum render scale is too big. It‘s constrained by the maximum render target dimension below.“;
private const string ScaleRenderTargetResolutionCostlyHelpBoxText =
“Changing the render target resolution is very costly and should be reduced to a minimum therefore“
+ “ this setting is turned off by default. Make sure you understand the performance implication this“
+ “ setting has when leaving it enabled.“;
private const string NoRenderScaleLevelsYetHelpBoxText =
“Overriding render viewport scale levels is disabled because there are no render viewport scale levels calculated yet.“
+ “ They will be calculated at runtime.“;
public override void OnInspectorGUI()
{
serializedobject.Update();
var adaptiveQuality = (VRTK_AdaptiveQuality)target;
EditorGUILayout.HelpBox(DontDisableHelpBoxText adaptiveQuality.enabled ? MessageType.Warning : MessageType.Error);
EditorGUILayout.Space();
EditorGUILayout.PropertyField(serializedobject.FindProperty(“drawDebugVisualization“));
EditorGUILayout.PropertyField(serializedobject.FindProperty(“allowKeyboardShortcuts“));
EditorGUILayout.PropertyField(serializedobject.FindProperty(“allowCommandLineArguments“));
EditorGUILayout.PropertyField(serializedobject.FindProperty(“msaaLevel“));
EditorGUILayout.Space();
serializedobject.FindProperty(“scaleRenderViewport“).boolValue =
EditorGUILayout.BeginToggleGroup(VRTK_EditorUtilities.BuildGUIContent(“scaleRenderViewport“)
adaptiveQuality.scaleRenderViewport);
{
float minimumRenderScale = adaptiveQuality.minimumRenderScale;
float maximumRenderScale = adaptiveQuality.maximumRenderScale;
EditorGUILayout.BeginHorizontal();
{
var fieldInfo = adaptiveQuality.GetType().GetField(“minimumRenderScale“);
var rangeAttribute = (RangeAttribute)Attribute.GetCust
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-06-27 08:56 VRTK-3.1.0\
文件 181 2017-02-25 01:28 VRTK-3.1.0\.editorconfig
文件 105 2017-02-25 01:28 VRTK-3.1.0\.gitattributes
文件 909 2017-02-25 01:28 VRTK-3.1.0\.gitignore
文件 192 2018-05-04 14:07 VRTK-3.1.0\Assets.me
目录 0 2018-06-27 08:56 VRTK-3.1.0\Assets\
文件 191 2017-02-25 01:28 VRTK-3.1.0\Assets\VRTK.me
目录 0 2018-06-27 08:56 VRTK-3.1.0\Assets\VRTK\
文件 571315 2017-02-25 01:28 VRTK-3.1.0\Assets\VRTK\DOCUMENTATION.pdf
文件 174 2017-02-25 01:28 VRTK-3.1.0\Assets\VRTK\DOCUMENTATION.pdf.me
文件 191 2017-02-25 01:28 VRTK-3.1.0\Assets\VRTK\Editor.me
目录 0 2018-06-27 08:56 VRTK-3.1.0\Assets\VRTK\Editor\
文件 7665 2017-02-25 01:28 VRTK-3.1.0\Assets\VRTK\Editor\VRTK_AdaptiveQualityEditor.cs
文件 263 2017-02-25 01:28 VRTK-3.1.0\Assets\VRTK\Editor\VRTK_AdaptiveQualityEditor.cs.me
文件 1378 2017-02-25 01:28 VRTK-3.1.0\Assets\VRTK\Editor\VRTK_EditorUtilities.cs
文件 262 2017-02-25 01:28 VRTK-3.1.0\Assets\VRTK\Editor\VRTK_EditorUtilities.cs.me
文件 7081 2017-02-25 01:28 VRTK-3.1.0\Assets\VRTK\Editor\VRTK_ob
文件 263 2017-02-25 01:28 VRTK-3.1.0\Assets\VRTK\Editor\VRTK_ob
文件 1380 2017-02-25 01:28 VRTK-3.1.0\Assets\VRTK\Editor\VRTK_PolicyListEditor.cs
文件 262 2017-02-25 01:28 VRTK-3.1.0\Assets\VRTK\Editor\VRTK_PolicyListEditor.cs.me
文件 12197 2017-02-25 01:28 VRTK-3.1.0\Assets\VRTK\Editor\VRTK_SDKManagerEditor.cs
文件 262 2017-02-25 01:28 VRTK-3.1.0\Assets\VRTK\Editor\VRTK_SDKManagerEditor.cs.me
文件 192 2017-02-25 01:28 VRTK-3.1.0\Assets\VRTK\Examples.me
目录 0 2018-06-27 08:56 VRTK-3.1.0\Assets\VRTK\Examples\
文件 19962 2017-02-25 01:28 VRTK-3.1.0\Assets\VRTK\Examples\001_CameraRig_VR_PlayArea.unity
文件 175 2017-02-25 01:28 VRTK-3.1.0\Assets\VRTK\Examples\001_CameraRig_VR_PlayArea.unity.me
文件 32022 2017-02-25 01:28 VRTK-3.1.0\Assets\VRTK\Examples\002_Controller_Events.unity
文件 175 2017-02-25 01:28 VRTK-3.1.0\Assets\VRTK\Examples\002_Controller_Events.unity.me
文件 51737 2017-02-25 01:28 VRTK-3.1.0\Assets\VRTK\Examples\003_Controller_SimplePointer.unity
文件 175 2017-02-25 01:28 VRTK-3.1.0\Assets\VRTK\Examples\003_Controller_SimplePointer.unity.me
文件 53349 2017-02-25 01:28 VRTK-3.1.0\Assets\VRTK\Examples\004_CameraRig_BasicTeleport.unity
............此处省略957个文件信息
- 上一篇:全套尚硅谷资料.doc
- 下一篇:01011011-盖聂-操作系统实验报告.pdf
评论
共有 条评论