《SteamVR2.2.0快速入门》 |
版本 |
作者 |
参与者 |
完成日期 |
备注 |
SteamVR2.2.0_Teleport_V01_1.0 |
严立钻 |
|
2019.04.18 |
|
|
|
|
|
|
##《SteamVR2.2.0快速入门》发布说明:
++++“SteamVR2.2.0快速入门”:是对“SteamVR2.2.0”的快速入门(Quick Start);(2019年度的重点技术突破点确立为:“SteamVR”);
++++“SteamVR2.2.0快速入门”:定位在熟悉SteamVR框架;
++++SteamVR的Github:https://github.com/ValveSoftware/steamvr_unity_plugin
++++SteamVR的QuickStart:https://valvesoftware.github.io/steamvr_unity_plugin/
++++SteamVR的Releases:https://github.com/ValveSoftware/steamvr_unity_plugin/releases
++++SteamVR2.2.0开发指南:https://blog.csdn.net/VRunSoftYanlz/article/details/88784527
++++SteamVR2.2.0快速入门:https://blog.csdn.net/VRunSoftYanlz/article/details/88833579
++++SteamVR2.2.0交互系统:https://blog.csdn.net/VRunSoftYanlz/article/details/89199778
++++SteamVR2.2.0传送机制:https://blog.csdn.net/VRunSoftYanlz/article/details/89390866
++++SteamVR2.2.0官方教程:https://blog.csdn.net/VRunSoftYanlz/article/details/89324067
#第一篇:v2.2.0快速入门 |
#第一篇:v2.2.0快速入门
++++立钻哥哥:”Valve” maintains a “Unity plugin” to smoothly interface “SteamVR” with Unity. With “SteamVR” developers can target one API that all the popular VR headsets can connect to. The modern “SteamVR Unity Plugin” manages three main things for developers: loading 3d models for VR controllers, handling input from those controllers, and estimating what your hand looks like while using those controllers. On top of managing those things we have an “Interaction System example” to help get your VR application off the ground. Proving concrete examples of interacting with the virtual world and our APIs.(立钻哥哥:“Valve”维护了一个“Unity插件”,使“SteamVR”与Unity的界面更加流畅。使用“SteamVR”,开发者可以将所有流行的VR头盔连接到一个API上。现代的“SteamVR Unity插件”为开发者管理了三件主要的事情:为VR控制器加载3d模型,处理来自这些控制器的输入,以及在使用这些控制器时估计你的手的样子。在管理这些事情之上,我们有一个“交互系统示例”来帮助您的VR应用程序起步。证明与虚拟世界和我们的api交互的具体例子。)
++++A.1、Quickstart
++++A.2、Render Models
++++A.3、SteamVR Input
++++A.4、Skeleton Input
++++A.5、Interaction System
++++A.6、Skeleton Poser
++++A.7、立钻哥哥带您v2.2.0快速入门
++++https://valvesoftware.github.io/steamvr_unity_plugin/
##A.1、Quickstart |
++A.1、Quickstart
++++立钻哥哥:There’s a quickstart guide here that will lead you through the process of getting setup with the “SteamVR Unity Plugin” and into a scene.(立钻哥哥:这里有一个快速入门指南,将带领你通过“SteamVR Unity插件”的安装过程进入一个场景。)
++++https://valvesoftware.github.io/steamvr_unity_plugin/articles/Quickstart.html
##A.2、Render Models |
++A.2、Render Models
++++立钻哥哥:”SteamVR” works with a wide array of headsets and controllers. When you have a tracked device in VR it’s nice to have an accurate visualization of that device. Instead of shipping each individual model and texture for each controller with each application, “SteamVR” can manage this for you. We include a “SteamVR_RenderModel” component that you can put on a gameobject that will auto load whatever device “SteamVR” detects for a given Pose. Put a “SteamVR_Behaviour_Pose” on a gameobject to get the position and rotation of a controller and then a “SteamVR_RenderModel” to show the 3d model for that controller that will animate with button presses. See the simple sample scene or the “SteamVR/Prefabs/CameraRig” prefab for an example.(立钻哥哥:“SteamVR”与各种头盔和控制器配合使用。当你在VR中拥有一个被跟踪的设备时,拥有该设备的精确可视化效果是很好的。“SteamVR”可以为您管理这一点,而不是为每个应用程序为每个控制器提供每个单独的模型和纹理。我们包括了一个“SteamVR_RenderModel”组件,你可以把它放在一个gameobject(游戏对象)上,它会自动加载任何设备“SteamVR”检测到的给定姿势。在gameobject(游戏物体)上放置一个“SteamVR_Behavior_Pose”来获取控制器的位置和旋转,然后是一个“SteamVR_RenderModel”来显示控制器的3d模型,该模型将通过按键来动画。参见简单的场景示例或“SteamVR/Prefabs/CameraRig”预制件作为示例。)
++++https://valvesoftware.github.io/steamvr_unity_plugin/articles/Render-Models.html
##A.3、SteamVR Input |
++A.3、SteamVR Input
++++立钻哥哥:Since “SteamVR” works with so many different input devices we’ve simplified the process of accommodating all these devices. Instead of referencing the individual buttons on one controller, with “SteamVR Input” you reference an action. Instead of writing the code to recognize “pulling the trigger button down 75% of the way to grab the block” you can now just focus on the last bit of that, “grab the block”. You still configure the default for what “grab” means but the user can rebind it to their preference in a standard interface. And when a new input device comes out your users can publish bindings to share for that device with no code changes on your end.(立钻哥哥:因为“SteamVR”可以与许多不同的输入设备一起工作,所以我们简化了容纳所有这些设备的过程。使用“SteamVR Input”引用一个动作,而不是引用一个控制器上的单个按钮。不需要编写代码来识别“在抓取物体的过程中按下75%的触发按钮”,现在只需将注意力集中在最后一点上,即“抓取物体”。您仍然可以为“grab”的含义配置默认值,但是用户可以在标准界面中将其重新绑定到他们的首选项。当一个新的输入设备出现时,您的用户可以发布绑定来共享该设备,而不需要您更改代码。)
++++https://valvesoftware.github.io/steamvr_unity_plugin/articles/SteamVR-Input.html
##A.4、Skeleton Input |
++A.4、Skeleton Input
++++立钻哥哥:Inline with the “Knuckles Valve” has released a system to get skeletal hand data independent from the controller you’re using. Some controllers have a high fidelity for hand tracking data with individual joints, some controllers only have buttons that we use to approximate joint data. We use whatever is available and give you two major sets of data: “With Controller”, “Without Controller”.(立钻哥哥:内联的“关节阀”已经发布了一个系统,以获得骨骼手数据独立于你使用的控制器。有些控制器对单个关节的手部跟踪数据有很高的保真度,有些控制器只有我们用来近似关节数据的按钮。我们使用所有可用的数据,并给出两组主要的数据:“带控制器”和“不带控制器”。)
++++[With Controller]: Our best approximation of where the joints in your hand are wrapped around your controller in the real world.(立钻哥哥:[带控制器]:我们的最佳近似值,在现实世界中,您手中的关节是围绕在控制器周围的。)
++++[Without Controller]: Based on the “With Controller” data we estimate how open or closed your hand it as if you were trying to hold your hand flat or make a fist.(立钻哥哥:[不带控制器]:根据“有控制器”的数据,我们估计你的手张开或闭合的程度,就像你试图把你的手放平或握紧拳头一样)
++++Included in this plugin are example models of gloves that you can freely use in your products. In addition we have a helper component that takes the data from “SteamVR” and applies it to these gloves: “SteamVR_Behaviour_Skeleton”. For an example of this in action see the “Interaction System” sample scene.(立钻哥哥:这个插件包括手套的例子模型,你可以在你的产品中免费使用。此外,我们还有一个助手组件,它从“SteamVR”获取数据并将其应用于这些手套:“SteamVR_Behaviour_Skeleton”。有关实际操作的示例,请参见“交互系统”示例场景。)
++++https://valvesoftware.github.io/steamvr_unity_plugin/articles/Skeleton-Input.html
##A.5、Interaction System |
++++立钻哥哥:After “Valve” released “The Lab” we took the learning form that project and created an “Interaction System” that others could use in their own projects. This system has been updated since then to use “SteamVR Input” and the new “SteamVR Skeleton Input” systems. This system can serve as an example of how to use the these new systems. It includes the following examples: (立钻哥哥:在“Valve”发布了“The Lab”之后,我们采用了该项目的学习形式,并创建了一个“交互系统”,其他人可以在他们自己的项目中使用。从那时起,该系统已经更新为使用“SteamVR输入”和新的“SteamVR骨架输入”系统。这个系统可以作为如何使用这些新系统的一个例子。它包括以下例子:)
++++[Interaction with Unity UI elements]: 与Unity UI元素的交互;
++++[Pickup, Drop, and Throw]: 拾起,放下,扔出去;
++++[Multiple variations on throwing velocities]: 投掷速度的多种变化;
++++[Bow and Arrow]: 弓箭;
++++[Wheel interactions]: 轮交互;
++++[Proximity button]: 邻近按钮;
++++[Variety of Skeleton Input example]: 各种骨架输入示例;
++++[Teleporting]: 传送;
++++[Using held objects]: 使用抓握对象;
++++[Using Skeleton Input to from a hand around a held object]: 使用手持物体的手的骨架输入;
+++++++++++++++++++++++
++++https://valvesoftware.github.io/steamvr_unity_plugin/articles/Interaction-System.html
++++立钻哥哥:The “Interaction System” is a series of scripts, prefabs and other assets that were the basis of all the minigames and other scenes in “The Lab”. This system was initially designed to be designed to be lightweight and flexible so that it could support all the experiments that we were working on at the time. Since then it has been updated to be an example of the new features we’ve added to “SteamVR”. Including “SteamVR Input”(actions/action sets) and “Skeleton Input(hands)”. Hopefully it can serve as a good starting point for your own experiments and help you in developing your projects.(立钻哥哥:交互系统”是一系列脚本、预制件和其他资源,是《实验室》中所有迷你游戏和其他场景的基础。这个系统最初被设计成轻量级和灵活的,这样它就可以支持我们当时正在进行的所有实验。从那时起,它被更新为我们添加到“SteamVR”的新功能的一个例子。包括“SteamVR输入”(动作/动作集)和“骨架输入(手)”。希望它能成为你自己实验的一个很好的起点,并帮助你开发你的项目。)
++++立钻哥哥:With these basic building blocks you can then go on and create some fairly complex objects. For some examples take a look at the “Interactions_Example” scene in “Assets/SteamVR/InteractionSystem/Samples/Scenes”.(立钻哥哥:使用这些基本的构建块,您可以继续创建一些相当复杂的对象。要获得一些示例,请查看“Assets/SteamVR/InteractionSystem/Samples/Scenes”中的“Interactions_Example”场景。)
++++[1、Create a new scene]: 新建场景;
++++[2、Delete the “Main Camera” object]: 删除“主摄像机”对象;
++++[3、Drag in the “Player” prefab from Core/Prefabs into your scene. This prefab sets up the main Player component and the hands. It also hooks into all the relevant “SteamVR Input” actions needed.]: 将“Player”预置从Core/Prefabs拖到场景中。这个预置设置了主要的玩家和手。它还挂钩到所有相关的“SteamVR输入”行动需要;
++++[4、You should be able to see the scene in the headset now along with your controllers being tracked in the scene.]: 您现在应该可以看到头盔中的场景,以及您的控制器在场景中被跟踪。
++++[5、If you have controllers that support “Skeleton Input” you’ll also see hands that touch and press the buttons on your controllers.]: 如果你有支持“骨架输入”的控制器,你还会看到双手触摸并按下控制器上的按钮。
++++[6、Add the “Interactable” component to any object in the scene. All the other components on this object will then start receiving relevant messages from the player’s hands.(Look at Samples/Scripts/InteractableExample.cs for example usage)]: 将“Interactable”组件添加到场景中的任何对象中。该对象上的所有其他组件将开始从玩家手中接收相关消息。(查看示例/脚本/InteractableExample.cs示例用法)
++++[7、We have included a few commonly used interactable classes such as the Throwable. Adding this component to your object will allow it to be picked up and thrown by the player.]: 我们已经包含了一些常用的可交互类,比如Throwable。将此组件添加到对象中,将允许玩家拾取并抛出该物体。
++++[8、You can then add the “Skeleton Poser” component to a GameObject with an “Interactable” and pose how you want the hand to look when interacting with it.]: 然后你可以将“Skeleton Poser”组件添加到带有“Interactable”的GameObject(游戏物体)中,并在与之交互时摆出你想要的手的样子。
++++[9、To add teleporting to your scene drag in the Teleporting prefab from Teleport/Prefabs into your scene. This will set up all the teleport logic.]:要将传送到场景中,请将传送预制块从Teleport/Prefabs拖拽到场景中。这将设置所有的传送逻辑。
++++[10、Drag in some TeleportPoint prefabs from Teleport/Prefabs to add locations that the player can teleport to.]: 从Teleport/ Prefabs中拖入一些TeleportPoint prefabs,添加玩家可以传送到的位置.
++++[11、You can also add the TeleportArea component to any object in your scene. This will allow the player to teleport anywhere along the collider for that object.]: 您还可以将TeleportArea组件添加到场景中的任何对象。这将允许玩家在碰撞体的任何地方传送该物体。
//Purpose: Demonstrates how to create a simple interactable object(立钻哥哥:目的:展示了如何创建一个简单的interactable对象)
using UnityEngine; using System.Collections;
namespace Valve.VR.InteractionSystem.Sample{ [RequireComponent(typeof(Interactable))] public class InteractableExample : MonoBehaviour{ private TextMesh generalText; private TextMesh hoveringText; private Vector3 oldPosition; private Quaternion oldRotation;
private float attachTime;
private Interactable interactable;
void Awake(){}
//Called when a Hand starts hovering over this object.(立钻哥哥:当一只手开始悬停在该对象上时调用。) private void OnHandHoverBegin(Hand hand){}
//Called when a Hand stops hovering over this object.(立钻哥哥:当一只手停止悬停在该对象上时调用.) private void OnHandHoverEnd(Hand hand){}
//Called every Update() while a Hand is hovering over this object.(立钻哥哥:当一只手悬停在此对象上时调用每个Update()) private void HandHoverUpdate(Hand hand){}
//Called when this GameObject becomes attached to the hand.(立钻哥哥:当GameObject(游戏物体)与手相连时调用.) private void OnAttachedToHand(Hand hand){}
//Called when this GameObject is detached from the hand.(立钻哥哥:当GameObject(游戏物体)与手分离时调用.) private void OnDetachedFromHand(Hand hand){}
//Called every Update() while this GameObject is attached to the hand.(立钻哥哥:调用每个Update(),而这个GameObject则被附加到指针上.) private void HandAttachedUpdate(Hand hand){}
private bool lastHovering = false; private void Update(){}
//Called when this attached GameObject becomes the primary attached object.(立钻哥哥:当这个附属游戏对象成为主要附属对象时调用) private void OnHandFocusAcquired(Hand hand){}
//Called when another attached GameObject becomes the primary attached object.(立钻哥哥:当另一个附加游戏对象成为主要附加对象时调用.) private void OnHandFocusLost(Hand hand){}
} //立钻哥哥:public class InteractableExample:MonoBehaviour{}
} //立钻哥哥:namespace Valve.VR.InteractionSystem.Sample{} |
//Purpose: Handles all the teleport logic.(立钻哥哥:用途:处理所有的传送逻辑.)
using UnityEngine; using UnityEngine.Events; using System.Collections;
namespace Valve.VR.InteractionSystem{ public class Teleport : MonoBehaviour{ public SteamVR_Action_Boolean teleportAction = SteamVR_Input.GetAction<SteamVR_Action_Boolean>(“Teleport”);
public LayerMask traceLayerMask; public LayerMask floorFixupTraceLayerMask;
private Coroutine hintCoroutine = null;
SteamVR_Events.Action chaperoneInfoInitializedAction;
//Events public static SteamVR_Events.Event<float> ChangeScene = new SteamVR_Events.Event<float>(); public static SteamVR_Events.Action<float> ChangeSceneAction(UnityAction<float> action){}
public static SteamVR_Events.Event<TeleportMarkerBase> Player = new SteamVR_Events.Event<TeleportMakerBase>(); public static SteamVR_Events.Action<TeleportMakerBase> PlayerAction(UnityAction<TeleportMarkerBase> action){}
public static SteamVR_Events.Event<TeleportMarkerBase> PlayerPre = new SteamVR_Events.Event<TeleportMakerBase>(); public static SteamVR_Events.Action<TeleportMarkerBase> PlayerPreAction(UnityAction<TeleportMarkerBase> action){}
private static Teleport _instance; public static Teleport instance{}
void Awake(){} void Start(){} void OnEnable(){} void OnDisable(){}
private void CheckForSpawnPoint(){} public void HideTeleportPointer(){}
void Update(){}
private void UpdatePointer(){}
void FixedUpdate(){}
private void OnChaperoneInfoInitialized(){}
private void HidePointer(){} private void ShowPointer(Hand newPointerHand, Hand oldPointerHand){}
private void UpdateTeleportColors(){}
private void PlayAudioClip(AudioSource source, AudioClip clip){ source.clip = clip; source.Play(); }
private void PlayPointerHaptic(bool validLocation){} private void TryTeleportPlayer(){} private void InitiateTeleportFade(){} private void TeleportPlayer(){} private void HighlightSelected(TeleportMarkerBase hitTeleportMarker){}
public void ShowTeleportHint(){} public void CancelTeleportHint(){}
private IEnumerator TeleportHintCoroutine(){}
public bool IsEligibleForTeleport(Hand hand){}
private bool ShouldOverrideHoverLock(){} private bool WasTeleportButtonReleased(Hand hand){} private bool IsTeleportButtonDown(Hand hand){} private bool WasTeleportButtonPressed(Hand hand){} private Transform GetPointerStartTransform(Hand hand){}
} //立钻哥哥:public class Teleport:MonoBehaviour{}
} //立钻哥哥:namespace Valve.VR.InteractionSystem{} |
//Purpose: Single location that the player can teleport to.(立钻哥哥:用途:单一的位置,玩家可以传送到.) using UnityEngine; using UnityEngine.UI; #if UNITY_EDITOR using UnityEditor; #endif
namespace Valve.VR.InteractionSystem{ public class TeleportPoint : TeleportMarkerBase{ public enum TeleportPointType{ MoveToLocation, SwitchToNewScene };
//Public variables public TeleportPointType teleportType = TeleportPointType.MoveToLocation; public string title; public string switchToScene;
//Private data private bool gotReleventComponents = false; private MeshRenderer markerMesh; private MeshRenderer switchSceneIcon; private MeshRenderer moveLocationIcon;
//Constants private const string switchSceneAnimation = “switch_scenes_idle”; private const string moveLocationAnimation = “move_location_idle”; private const string lockedAnimation = “locked_idle”;
public override bool showReticle{}
void Awake(){} void Start(){} void Update(){}
public override bool ShouldActivate(Vector3 playerPosition){} public override bool ShouldMovePlayer(){} public override void Highlight(bool highlight){} public override void UpdateVisuals(){} public override void SetAlpha(float tintAlpha, float alphaPercent){}
public void SetMeshMaterials(Material material, Color textColor){} public void TeleportToScene(){} public void GetRelevantComponents(){} public void ReleaseRelevantComponents(){} public void UpdateVisualsInEditor(){}
} //立钻哥哥:public class TeleportPoint:TeleportMarkerBase{}
#if UNITY_EDITOR [CustomEditor(typeof(TeleportPoint))] public class TeleportPointEditor : Editor{ void OnEnable(){} public override void OnInspectorGUI(){} } //立钻哥哥:public class TeleportPointEditor:Editor{} #endif
} //立钻哥哥:namespace Valve.VR.InteractionSystem{} |
//Purpose: An area that the player can teleport to.(立钻哥哥:用途:玩家可以传送到的区域.) using UnityEngine; #if UNITY_EDITOR using UnityEditor; #endif
namespce Valve.VR.InteractionSystem{ public class TeleportArea : TeleportMarkerBase{ //Public properties public Bounds meshBounds{}
//Private data private MeshRenderer areaMesh; private int tintColorId = 0; private Color visibleTintColor = Color.clear; private Color highlightedTintColor = Color.clear; private Color lockedTintColor = Color.clear; private bool highlighted = false;
public void Awake(){} public void Start(){}
public override bool ShouldActivate(Vector3 playerPosition){} public override bool ShouldMovePlayer(){} public override void Highlight(bool highlight){} public override void SetAlpha(float tintAlpha, float alphaPercent){} public override void UpdateVisuals(){}
public void UpdateVisualsInEditor(){} private bool CalculateBounds(){}
} //立钻哥哥:public class TeleportArea:TeleportMarkerBase{}
#if UNITY_EDITOR [CustomEditor(typeof(TeleportArea))] public class TeleportAreaEditor : Editor{ void OnEnable(){} public override void OnInspectorGUI(){} } //立钻哥哥:public class TeleportAreaEditor:Editor{} #endif
} //立钻哥哥:namespace Valve.VR.InteractionSystem{} |
++++立钻哥哥:The sample scene Interactions_Example in the “Samples/Scenes” folder includes all of the major components and is a good place to familiarize yourself with the system. The scene contains the following elements:(立钻哥哥:“Samples/Scenes”文件夹中的示例场景 Interactions_Example包含所有主要组件,是熟悉系统的好地方。场景包含以下元素:)
++++立钻哥哥:Now we’ll go a little more in depth into some of the basic components included in the interaction system. The system is broken up into a few different part: (立钻哥哥:现在我们将更深入地讨论交互系统中包含的一些基本组件。该系统分为几个不同的部分:)
++++[Core]: A the core of the interaction system are the “Player”, “Hand” and “Interactable” classes. The provided Player prefab sets up the player object and the “SteamVR” camera for the scene.(立钻哥哥:【Core】:交互系统的核心是“Player”、“Hand”和“Interactable ”类。所提供的Player预置设置了Player对象和场景的“SteamVR”摄像机。)
----The interaction system works by sending messages to any object that the hands interact with. These objects then react to the message and can attach themselves to the hands if wanted.(立钻哥哥:交互系统的工作原理是将消息发送到与手交互的任何对象。然后,这些对象对消息作出反应,如果需要,可以将自己附加到手上.)
----To make any object receive message from the hands just add the Interactable component to that object. This object will then be considered when the hand does its hovering checks.(立钻哥哥:要使任何对象从手接收消息,只需将Interactable组件添加到该对象。当手进行悬停检查时,将考虑该对象。)
----We have also included a few commonly used interactables such as the “Throwable” or the “LinearDrive”.(立钻哥哥:我们还包括了一些常用的交互,如“Throwable”或“LinearDrive”.)
----The “Player” prefab also creates an “InputModule” which allows the hands to mimic mouse events to easily work with “Unity UI widgets”.(立钻哥哥:“Player”预置还创建了一个“InputModule”,允许双手模拟鼠标事件,以便轻松地使用“Unity UI widgets”。)
----The interaction system also includes a fallback mode which allows for typical first-person camera controls using the keyboard and mouse. This also allows the mouse to act like one of the player’s hands. This mode is particularly useful when not everyone on the team has access to “VR” headset.(立钻哥哥:交互系统还包括一个备选模式,允许使用键盘和鼠标进行典型的第一人称相机控制。这也允许鼠标像玩家的一只手一样工作。当团队中并非所有人都能使用“VR”头盔时,这种模式尤其有用。)
++++立钻哥哥:The Player class acts like a singleton which means there should only be one Player object in the scene.(立钻哥哥:Player类就像一个单例对象,这意味着场景中应该只有一个Player对象。)
++++The player itself doesn’t do much except for keep track of the hands and the hmd.(立钻哥哥:除了跟踪手和hmd,Player本身并没有做什么.)
++++It can be accessed globally throughout the project and many aspects of the interaction system assume that the “Player” object always exists in the scene.(立钻哥哥:它可以在整个项目中全局访问,交互系统的许多方面都假设“Player”对象始终存在于场景中。)
++++It also keeps track of whether you are in VR mode or 2D fallback mode.(立钻哥哥:它还可以跟踪你是在VR模式还是2D备选模式)
++++Using the accessors through the “Player” class allows the other components to function similarly without knowing if the VR headset or mouse/keyboard is being used.(立钻哥哥:通过“Player”类使用访问器可以让其他组件在不知道是否使用VR头盔或鼠标/键盘的情况下进行类似的操作.)
++++The 2D fallback mode is useful but has its limitations. We mainly used this mode for testing out very simple interactions that only required 1 hand and the trigger button. It was mainly useful during development when not everyone on the team had a VR headset on controllers with them at all times.(立钻哥哥:2D备选模式很有用,但也有其局限性。我们主要使用这种模式来测试非常简单的交互,只需要一只手和触发按钮。这在开发过程中非常有用,因为团队中并不是每个人都随身携带VR头盔.)
++++The Player also includes a few useful properties:(立钻哥哥:玩家还包括一些有用的属性:)
----[hmdTransform]: This will always return the transform of the current camera. This could be the VR headset or the 2D fallback camera.(立钻哥哥:hmdTransform:它总是返回当前相机的转换。这可能是VR头盔或2D后置摄像头.)
----[feetPositionGuess]: This guesses the position of the player’s feet based on the where the hmd is. Since we don’t actually know the position of their feet, this can be pretty inaccurate depending on how the player is standing.(立钻哥哥:feetPositionGuess:根据hmd的位置猜测玩家的脚的位置。因为我们实际上并不知道他们的脚的位置,这可能是非常不准确的,这取决于玩家是如何站着的)
----[bodyDirectionGuess]: This is similar to the “feetPositionGuess” in that it can be inaccurate depending on how the player is standing.(立钻哥哥:bodyDirectionGuess:这类似于“feetPositionGuess”,因为它可能是不准确的,这取决于玩家是如何站着的。)
++++Note: The player class is set up to use icons to show the feet and hands in the editor scene view but due to the way Unity works these icons have to be located in a specific folder to work. These icons are provided under “Core/Icons”. Move them to a folder named “Gizoms” in the root of your projects “Asset” tree and they should work.(立钻哥哥:注意:player类设置为使用图标在编辑器场景视图中显示手脚,但由于Unity的工作方式,这些图标必须位于特定的文件夹中才能工作。这些图标在“Core/ Icons”下提供。将它们移到项目“资源”树的根目录中名为“Gizoms”的文件夹中,它们应该可以工作。)
++++The 2D fallback mode can be useful during testing but it’s probably not something that you want to ship with your finished game. There are 2 ways to disable it:(立钻哥哥:2D备选模式在测试过程中非常有用,但它可能并不是你想要在完成游戏后发行的东西。有两种方法可以禁用它:)
----Uncheck the “Allow Toggle To 2D” bool on the player object in your scene before making your build.(立钻哥哥:在生成之前,取消场景中Player对象上的“允许切换到2D”选项)
----Add “HIDE_DEBUG_UI” to the list of “Scripting Define Symbols” in your project’s “PlayerSettings”. This will only disable the 2D debug view in builds of your game while allowing you to keep using it in the editor.(立钻哥哥:将“HIDE_DEBUG_UI”添加到项目“PlayerSettings”中的“脚本定义符号”列表中。这只会禁用游戏构建中的2D调试视图,同时允许您在编辑器中继续使用它.)
++++立钻哥哥:The “Hand” class does most of the heavy lifting for the “interaction system”.(“Hand”类为“交互系统”做了大部分繁重的工作。)
++++The Hand checks for objects(Interactables) that it is hovering over and sends them messages based on the current hover state.(立钻哥哥:Hand检查它所悬停的对象(Interactables),并根据当前悬停状态向它们发送消息.)
++++The hand can only hover on 1 object at a time and only 1 hand can hover on an object at the same time.(立钻哥哥:一只手一次只能悬停在一个物体上,同时也只能悬停在一个物体上.)
++++Objects can be attached to and detached from the Hand. Only one object can be the object in focus of the hand but multiple objects can be attached to the hand at the same time.(立钻哥哥:物体可以附着在手上,也可以从手上分离出来。只有一个对象可以是手的焦点对象,但同时可以将多个对象附加到手.)
++++Once an object is detached from the hand then the previous object attached to the hand(if it is still attached) becomes the object in focus on the hand.(立钻哥哥:一旦一个对象与手分离,那么与手相连的前一个对象(如果它仍然与手相连)就成为手的焦点对象.)
++++When nothing is attached to the hand it will always show the controller.(立钻哥哥:当没有任何东西附着在手上时,它总是会显示控制器.)
++++The attached object can set AttachmentFlags that determine the behaviour of the hand and the object once it has been attached.(立钻哥哥:所附加的对象可以设置AttachmentFlags,该标记确定手和对象在被附加后的行为.)
++++The hand can be locked form hovering over other objects or any object depending on the situation.(立钻哥哥:根据不同的情况,可以将手锁定在悬停在其他物体或任何物体上.)
++++These are the message the hand sends to objects that it is interacting with: (立钻哥哥:这些是手发送给它正在与之交互的对象的消息:)
----[OnHandHoverBegin]: Sent when the hand first starts hovering over the object.(立钻哥哥:OnHandHoverBegin:当手第一次开始悬停在对象上时发送)
----[HandHoverUpdate]: Send every frame that the hand is hovering over the object.(立钻哥哥:HandHoverUpdate:发送手悬停在对象上的每一帧)
----[OnHandHoverEnd]: Sent when the hand stops hovering over the object.(立钻哥哥:OnHandHoverEnd:当手离开悬停在物体上时发送)
----[OnAttachedToHand]: Sent when the object gets attached to the hand.(立钻哥哥:OnAttachedToHand:当对象附加到hand时发送)
----[HandAttachedUpdate]: Sent every frame while the object is attached to the hand.(立钻哥哥:HandAttachedUpdate:当对象附在手上时,发送每一帧.)
----[OnDetachedFromHand]: Sent when the object gets detached from the hand.(立钻哥哥:OnDetachedFromHand:当对象脱离手时发送)
----[OnHandFocusLost]: Sent when an attached object loses focus because something else has been attached to the hand.(立钻哥哥:OnHandFocusLost:当一个附加对象因为其他对象被附加到手上而失去焦点时发送.)
----[OnHandFocusAcquired]: Send when an attached object gains focus because the previous focus object has been detached from the hand.(立钻哥哥:OnHandFocusAcquired:当一个附加对象获得焦点时发送,因为之前的焦点对象已经与手分离)
++++These are the message that the hand sends to its child objects:(立钻哥哥:这是手发送给它的子对象的消息:)
----[OnHandInitialized]: Sent when the hand first gets initialized by associating itself with the device ID of a “SteamVR” tracked controller.(立钻哥哥:OnHandInitialized:通过将自己与“SteamVR”跟踪控制器的设备ID相关联,首次初始化手时发送.)
----[OnParentHandHoverBegin]: Sent when the hand starts hovering over something.(立钻哥哥:OnParentHandHoverBegin:当手开始悬停在某物上时发送)
----[OnParentHandHoverEnd]: Sent when the hand stops hovering over something.(立钻哥哥:OnParentHandHoverEnd:当手离开悬停在某物上时发送)
----[OnParentHandInputFocusAcquired]: Sent when the game window gains input focus.(立钻哥哥:OnParentHandInputFocusAcquired:当游戏窗口获得输入焦点时发送)
----[OnParentHandInputFocusLost]: Send when the game window loses input focus.(立钻哥哥:OnParentHandInputFocusLost:当游戏窗口失去输入焦点时发送)
++++These members deal with attaching and detaching:(立钻哥哥:这些成员处理连接和分离:)
----[AttachObject]: Attaches the object from the hand using the passed in AttachmentFlags.(立钻哥哥:AttachObject:使用传递的AttachmentFlags从手上附加对象.)
----[DetachObject]: Detaches the object from the hand and optionally restores it to its original parent.(立钻哥哥:DetachObject:从手中分离对象,并可选地将其还原到其原始父对象)
----[currentAttachedObject]: This returns the in-focus attached object on the hand, if any.(立钻哥哥:currentAttachedObject:这将返回手上的in-focus附加对象(如果有的话).)
++++The Hand also has a few useful properties and functions that can be used to customize its behaviour:(立钻哥哥:手也有一些有用的属性和功能,可以用来定制其行为:)
----[OtherHand]: This is the other hand on the player. This can be useful for objects that need to interact with both hands such as the longbow.(立钻哥哥:另一只手:这是Player上的另一只手。这对于需要双手交互的对象(如长弓)非常有用)
----[HoverSphereTransform and Radius]: This can be used to customize the hover range of the hand.(立钻哥哥:HoverSphereTransform和Radius:可用于自定义手的悬停范围.)
----[HoverLayerMask]: This can be changed so that the hand only hovers over objects in certain layers.(立钻哥哥:HoverLayerMask:这可以改变,使手只悬停在某些层的对象上.)
----[HoverUpdateInterval]: The hovering check can be done more or less frequently depending on the requirements of your game.(立钻哥哥:HoverUpdateInterval:可以根据游戏的需求或多或少频繁地执行悬停检查.)
----[HoverLock/Unlock]: This is used to make the hand only hover over a certain object. Passing in null will make the hand not hover over anything while it is hover locked. This technique is used to make the hand not hover over objects while the teleport arc is active.(立钻哥哥:HoverLock/Unlock:这是用来让手只悬停在一个特定的物体上。传递null将使手在悬停锁定时不悬停在任何东西上。此技术用于使手在传送弧处于活动状态时不悬停在物体上.)
----[GetGrabStarting/GetGrabEnding]: These are used to determine if the boolean grab actions are being triggered at that time. There are two types of grabs-grip grab and pinch grab. These are generally associated with grip buttons and trigger buttons but serve special functions on the Knuckles controllers.(立钻哥哥:GetGrabStarting /GetGrabEnding:这些用于确定布尔抓取操作是否在那个时候被触发。抓握有两种类型-抓取和捏抓。这些通常与手柄按钮和触发器按钮相关联,但在Knuckles控制器上具有特殊功能)
----[GetAttachmentTransform]: Objects can use “attachment transforms” on the hand to figure out how to snap on to the hand. These are just named children of the “Hand” object. The “Player” prefab contains “Attach_ControllerTip” as an example.(立钻哥哥:GetAttachmentTransform:对象可以在手上使用“附件转换”来确定如何快速地抓住手。这些只是“Hand”对象的命名子对象。例如,“Player”预置包含“Attach_ControllerTip”.)
++++立钻哥哥:This is the single piece of the interaction system that combines all its basic parts.(这是交互系统的单个部分,它组合了所有的基本部分)
++++This prefab arranges the player and hands in a way to make them all accessible easily.(立钻哥哥:这个预置安排玩家和手在一种方式,使他们都容易访问)
++++It also contains all the setup for “SteamVR” and the 2D fallback system.(立钻哥哥:它还包含了所有的设置“SteamVR”和2D备份系统)
++++Most of the other components of the interaction system depend on the player and some of them assume that the player and hands are set up in this way.(立钻哥哥:交互系统的大多数其他组件都依赖于玩家,其中一些组件假设玩家和手是这样设置的.)
++++These should only be 1 of these in a scene.(立钻哥哥:在一个场景中有且只有一个Player.)
++++立钻哥哥:The teleport system from “The Lab” supports teleporting to specific teleport points or a more general teleport area.(“实验室”的传送系统支持传送到特定的传送点或更通用的传送区)
++++The important classes are Teleport, TeleportPoint and TeleportArea.(立钻哥哥:重要的类是Teleport、TeleportPoint和TeleportArea)
++++All the functionality is wrapped up in the Teleporting prefab in “Teleport/Prefabs”. This prefab included all the logic for the teleport system to function.(立钻哥哥:所有功能都封装在“传送/预置”中的传送预置中。这个预置包括了传送系统运作的所有逻辑.)
++++Add TeleportPoints or TeleportAreas to the scene to add spots where the player can teleport to.(立钻哥哥:向场景中添加传送点或传送区域,以添加玩家可以传送到的点)
//Purpose: Handles all the teleport logic.(立钻哥哥:用途:处理所有的传送逻辑) using UnityEngine; using UnityEngine.Events; using System.Collections;
namespace Valve.VR.InteractionSystem{ public class Teleport : MonoBehaviour{ public SteamVR_Action_Boolean teleportAction = SteamVR_Input.GetAction<SteamVR_Action_Boolean>(“Teleport”);
private Hand pointerHand = null; private Player player = null; private TeleportArc teleportArc = null;
private static Teleport _instance; public static Teleport instance{}
void Awake(){ _instance = this; }
void Start(){ teleportMarkers = GameObject.FindObjectsOfType<TeleportMarkerBase>(); player = InteractionSystem.Player.instance; }
void OnEnable(){} void OnDisable(){}
private void CheckForSpawnPoint(){}
public void HideTeleportPointer(){}
void Update(){}
private void UpdatePointer(){}
void FixedUpdate(){}
private void OnChaperoneInfoInitialized(){} private void HidePointer(){} private void ShowPointer(Hand newPointerHand, Hand oldPointerHand){} private void UpdateTeleportColors(){} private void PlayAudioClip(AudioSource source, AudioClip clip){} private void PlayPointerHaptic(bool validLocation){} private void TryTeleportPlayer(){} private void InitiateTeleportFade(){} private void TeleportPlayer(){} private void HighlightSelected(TeleportMarkerBase hitTeleportMarker){}
public void ShowTeleportHint(){} public void CancelTeleportHint(){}
private IEnumerator TeleportHintCoroutine(){}
public bool IsEligibleForTeleport(Hand hand){}
private bool ShouldOverrideHoverLock(){} private bool WasTeleportButtonReleased(Hand hand){} private bool IsTeleportButtonDown(Hand hand){} private bool WasTeleportButtonPressed(Hand hand){} private Transform GetPointerStartTransform(Hand hand){}
} //立钻哥哥:public class Teleport:MonoBehaviour{}
} //立钻哥哥:namespace Valve.VR.InteractionSystem{} |
++++立钻哥哥:This class handles most of the logic of teleporting.(这个类处理传送的大部分逻辑)
++++When the touchpad is pressed, the teleport pointer shows up. If the pointer is pointing at a valid spot when the touchpad is released when the player teleports.(立钻哥哥:当触摸板被按下时,传送指针就会出现。当玩家传送touchpad时,如果指针指向一个有效的点)
----You can also press “T” on the keyboard while in 2D fallback mode to bring up the teleport pointer.(立钻哥哥:你也可以按下键盘上的“T”,在2D备选模式,以打开传送指针)
++++This class keeps track of all the teleport markers in the scene and informs them to fade in/out depending on the state of the teleport pointer.(立钻哥哥:该类跟踪场景中的所有传送端口标记,并根据传送端口指针的状态通知它们淡入/淡出)
++++In certain situations it can be useful to have a separate mesh for the floor the scene that is different from the teleport mesh. In these situations the teleport system will trace down form where it hit the teleport mesh and try to place on the floor mesh. The point of this is to try to match the visual floor in the scene with the physical floor in the player’s play area.(立钻哥哥:在某些情况下,在地板上使用不同于传送网格的网格是很有用的。在这种情况下,传送系统将追踪它击中传送网的位置,并试图将其放置在地板网孔上。这样做的目的是尝试将场景中的视觉地板与玩家游戏区域中的物理地板匹配起来.)
++++There are a few properties that will probably need to be tweaked:(立钻哥哥:有一些属性可能需要调整:)
----[tracerLayerMask]: This is all the layers that the teleport pointer will try to hit.(立钻哥哥:[tracerLayerMask]:这是传送指针将尝试命中的所有层。)
----[floorFixupMask]: The layer that the floor is on.(立钻哥哥:[floorFixupMask]:地板所在的层。)
----[floorFixupMaximumTraceDistance]: The maximum distance to trace to try to look for the floor.(立钻哥哥:[floorFixupMaximumTraceDistance]:查找地板的最大跟踪距离。)
----[ShowPlayAreaMarker]: This toggles whether to show the rectangle of the player’s play area while teleporting. This can help in orienting the players in their physical space.(立钻哥哥:[ShowPlayAreaMarker]:这将切换是否显示传送时玩家游戏区域的矩形。这可以帮助玩家在他们的物理空间中找到方向。)
----[arcDistance]: How far the teleport arc should go. Increasing this number will allow the player to teleport further in the scene. This value will probably need to be tweaked for each scene.(立钻哥哥:[arcDistance]:传送弧应该走多远。增加这个数字将允许玩家在场景中传送得更远。这个值可能需要为每个场景进行调整)
++++立钻哥哥:This is the base class for all the teleport markers.(这是所有传送标记的基类。)
++++It contains methods that the “Teleport” class expects to be present in all the teleport markers.(立钻哥哥:它包含“Teleport”类期望出现在所有Teleport标记中的方法.)
++++You can use this as your base class to create a new type of teleport marker.(立钻哥哥:你可以用这个作为你的基类来创建一种新的传送标记)
++++A teleport marker can be locked or unlocked. The player cannot teleport to locked markers.(立钻哥哥:传送标记可以锁定或解锁。玩家不能传送到锁定的标记.)
//Purpose: Base class for all the objects that the player can teleport to.(立钻哥哥:用途:玩家可以传送到的所有对象的基类) using UnityEngine;
namespace Valve.VR.InteractionSystem{ public abstract class TeleportMarkerBase : MonoBehaviour{ public bool locked = false; public bool markerActive = true;
public virtual bool showReticle{ get{ return true; } }
public void SetLocked(bool locked){ this.locked = locked; UpdateVisuals(); }
public virtual void TeleportPlayer(Vector3 pointedAtPosition){}
public abstract void UpdateVisuals(); public abstract void Highlight(bool highlight); public abstract void SetAlpha(float tintAlpha, float alphaPercent); public abstract bool ShouldActivate(Vector3 playerPosition); public abstract bool ShouldMovePlayer(); } //立钻哥哥:public abstract class TeleportMarkerBase:MonoBehaviour{} } //立钻哥哥:namespace Valve.VR.InteractionSystem{} |
++++立钻哥哥:This is a teleport area that is made up of a mesh.(这是一个由网格组成的传送区)
++++When teleporting onto these, the player will teleport exactly where they are pointing(plus the floor fixup).(立钻哥哥:当传送到这些东西上时,玩家将会准确地传送到他们所指向的地方(加上地板固定))
++++Add this component to any object with a collider and a mesh renderer to allow the player to teleport on it.(立钻哥哥:将此组件添加到任何带有碰撞体和网格渲染器的对象中,以允许玩家在其上传送)
//Purpose: An area that the Player can teleport to.(立钻哥哥:用途:玩家可以传送到的区域) using UnityEngine; #if UNITY_EDITOR using UnityEditor; #endif
namespace Valve.VR.InteractionSystem{ public class TeleportArea : TeleportMarkerBase{ public Bounds meshBounds{ get; private set; }
private MeshRenderer areaMesh; private int tintColorId = 0; private Color visibleTintColor = Color.clear; private Color highlightedTintColor = Color.clear; private Color lockedTintColor = Color.clear; private bool highlighted = false;
public void Awake(){ areaMesh = GetComponent<MeshRenderer>(); tintColorId = Shader.PropertyToID(“_TintColor”); CalculateBounds(); }
public void Start(){ visibleTintColor = Teleport.instance.areaVisibleMaterial.GetColor(tintColorId); highlightedTintColor = Teleport.instance.areaHighlightedMaterial.GetColor(tintColorId); lockedTintColor = Teleport.instance.areaLockedMaterial.GetColor(tintColorId); }
public override bool ShouldActivate(Vector3 playerPosition){} public override bool ShouldMovePlayer(){} public override void Highlight(bool highlight){} public override void SetAlpha(float tintAlpha, float alphaPercent){} public override void UpdateVisuals(){} public void UpdateVisualsInEditor(){}
private bool CalculateBounds(){} private Color GetTintColor(){}
#if UNITY_EDITOR [CustomEditor(typeof(TeleportArea))] public class TeleportAreaEditor : Editor{ void OnEnable(){} public override void OnInspectorGUI(){} } //立钻哥哥:public class TeleportAreaEditor:Editor{} #endif
} //立钻哥哥:public class TeleportArea:TeleportMarkerBase{}
} //立钻哥哥:namespace Valve.VR.InteractionSystem{} |
++++立钻哥哥:This is a teleport point that the player can teleport to.(这是玩家可以传送到的传送点)
++++When teleporting onto these, the player will teleport at the origin of the point regardless of where on the point they were pointing.(立钻哥哥:当传送到这些东西上时,玩家将会在点的原点进行传送,而不管他们所指向的点在哪里。)
++++These points can be named.(立钻哥哥:这些点可以命名。)
++++The points also have the ability to teleport players to new scenes.(This isn’t fully functional since you will have to hook it up to your scene loading system.)(立钻哥哥:传送点还可以传送玩家到新的场景。(这并不是完全的功能,因为你必须把它连接到你的场景加载系统。))
//Purpose: Single location that the player can teleport to.(立钻哥哥:用途:单一的位置,玩家可以传送到) using UnityEngine; using UnityEngine.UI; #if UNITY_EDITOR using UnityEditor; #endif
namespace Valve.VR.InteractionSystem{ public class TeleportPoint : TeleportMarkerBase{ public enum TeleportPointType{ MoveToLocation, SwitchToNewScene };
public TeleportPointType teleportType = TeleportPointType.MoveToLocation; public string title; public string switchToScene; public Color titleVisibleColor; public Color titleHighlightedColor; public Color titleLockedColor; public bool playerSpawnPoint = false;
private bool gotReleventComponents = false; private MeshRenderer markerMesh; private Transform lookAtJointTransform; private new Animation animation; private Text titleText; private Player player; private Vector3 lookAtPosition = Vector3.zero; private int tintColorID = 0; private Color tintColor = Color.clear; private Color titleColor = Color.clear; private float fullTitleAlpha = 0.0f;
private const string switchSceneAnimation = “switch_scene_idle”; private const string moveLocationAnimation = “move_location_idle”; private const string lockedAnimation = “locked_idle”;
public override bool showReticle{ get{ return false; } }
void Awake(){ GetRelevantComponents(); animation = GetComponent<Animation>(); tintColorID = Shader.PropertyToID(“_TintColor”);
moveLocationIcon.gameObject.SetActive(false); switchSceneIcon.gameObject.SetActive(false); lockedIcon.gameObject.SetActive(false);
UpdateVisuals(); }
void Start(){ player = Player.instance; }
void Update(){ if(Application.isPlaying){ lookAtPosition.x = player.hmdTransform.position.x; lookAtPosition.y = lookAtJointTransform.position.y; lookAtPosition.z = player.hmdTransform.position.z;
lookAtJointTransform.LookAt(lookAtPosition); } }
public override bool ShouldActivate(Vector3 playerPosition){} public override bool ShouldMovePlayer(){} public override void Highlight(bool highlight){} public override void UpdateVisuals(){} public override void SetAlpha(float tintAlpha, float alphaPercent){}
public void SetMeshMaterials(Material material, Color textColor){} public void TeleportToScene(){} public void GetRelevantComponents(){} public void ReleaseRelevantComponents(){} public void UpdateVisualsInEditor(){}
#if UNITY_EDITOR [CustomEditor(typeof(TeleportPoint))] public class TeleportPointEditor : Editor{ void OnEnable(){} public override void OnInspectorGUI(){} } //立钻哥哥:public class TeleportPointEditor:Editor{} #endif
} //立钻哥哥:public class TeleportPoint:TeleportMarkerBase{}
} //立钻哥哥:namespace Valve.VR.InteractionSystem{} |
++++立钻哥哥:This draws the arc for the teleport pointer and does the physics trace for the teleport system.(这将为传送端口指针绘制弧线,并为传送端口系统进行物理跟踪。)
//Purpose: Displays the arc lines for teleporting and does the traces.(立钻哥哥:用途:显示用于远程传送的弧线并进行跟踪) using UnityEngine;
namespace Valve.VR.InteractionSystem{ public class TeleportArc : MonoBehaviour{ public int segmentCount = 60; public float thickness = 0.01f;
void Start(){ arcTimeOffset = Time.time; }
void Update(){}
private void CreateLineRendererObjects(){}
public void SetArcData(Vector3 position, Vector3 velocity, bool gravity, bool pointerAtBadAngle){ startPos = position; projectileVelocity = velocity; useGravity = gravity; arcTimeOffset = Time.time; arcInvalid = pointerAtBadAngle; }
public void Show(){} public void Hide(){}
//Draws each segment of the arc individually.(立钻哥哥:分别画出弧的每一段) public bool DrawArc(out RaycastHit hitInfo){}
private void DrawArcSegment(int index, float startTime, float endTime){}
public void SetColor(Color color){}
private float FindProjectileCollision(out RaycastHit hitInfo){}
public Vector3 GetArcPositionAtTime(float time){}
private void HideLineSegments(int startSegment, int endSegment){}
} //立钻哥哥:public class TeleportArc:MonoBehaviour{}
} //立钻哥哥:namespace Valve.VR.InteractionSystem{} |
++++立钻哥哥:By default you can’t teleport using a hand that has something attached to it. Adding this component to an attached object bypasses that rule.(默认情况下,你不能用一只手来传送东西。将此组件添加到附加对象可以绕过该规则。)
++++This is used by the BlankController and longbow Arrow objects so that the player can teleport even while they are attched to the hand.(立钻哥哥:这是使用空白控制器和长弓箭对象,以便玩家可以传送,即使他们是连接到手上.)
//Purpose: Adding this component to an object will allow the player to initiate teleporting while that object is attached to their hand.(立钻哥哥:目的:将这个组件添加到一个对象将允许玩家在该对象与他们的手连接时启动传送) using UnityEngine;
namespace Valve.VR.InteractionSystem{ public class AllowTeleportWhileAttachedToHand : MonoBehaviour{ public bool teleportAllowed = true; public bool overrideHoverLock = true; } //立钻哥哥:public class AllowTeleportWhileAttachedToHand:MonoBehaviour{} } //立钻哥哥:namespace Valve.VR.InteractionSystem{} |
++++立钻哥哥:Adding this to an object with a collider will allow the teleport trace to pass through it.(将其添加到带有碰撞体的对象将允许传送跟踪通过它。)
++++A different way of dealing with this would be to put that object on a different layer that the TeleportArc doesn’t check against.(立钻哥哥:另一种处理方法是将该对象放在TeleportArc不检查的另一个层上。)
++++This is used on the longbow Arrow to allow the teleport trace to pass through the arrow tip.(立钻哥哥:这是用于长弓箭允许传送跟踪通过箭头尖。)
//Purpose: Allows the teleport arc trace to pass through any colliders on this object.(立钻哥哥:目的:允许传送弧跟踪通过该对象上的任何碰撞器) using UnityEngine; using System.Collections;
namespace Valve.VR.InteractionSystem{ public class IgnoreTeleportTrace : MonoBehaviour{ } //立钻哥哥:public class IgnoreTeleportTrace:MonoBehaviour{} } //立钻哥哥:namespace Valve.VR.InteractionSystem{} |
++++立钻哥哥:This prefab sets up the entire teleport system.(这个预置设置了整个传送系统。)
++++Dragging this into your scene will give you the ability to bring up the teleport pointer in your game.(立钻哥哥:拖拽这个到你的场景中会让你在游戏中打开传送指针.)
++++All of the visuals and sounds of the teleport system can be changed by modifying the properties of this prefab.(立钻哥哥:所有的传送系统的视觉和声音可以通过修改这个预制的属性来改变。)
++++立钻哥哥:Add these to your scene to add locations that the player can teleport to.(将这些添加到场景中,以添加玩家可以传送到的位置。)
++++Note: The names of some of the objects in this scene are hard-coded and some of the code will need to be modified if you want to change the models.(立钻哥哥:注意:此场景中的一些对象的名称是硬编码的,如果您想更改模型,则需要修改其中的一些代码.)
++++立钻哥哥:Unlike the “SteamVR_Render_Model” component this “Render_Model” component inside the “Interaction System” handles both controller models as well as hand models and enabling/disabling them individually.(与“SteamVR_Render_Model”组件不同,“交互系统”中的“Render_Model”组件同时处理控制器模型和手动模型,并分别启用/禁用它们。)
using UnityEngine; using System.Collections; using System;
namespace Valve.VR.InteractionSystem{ public class RenderModel : MonoBehaviour{ public GameObject handPrefab;
protected GameObject handInstance; protected Renderer[] handRenderers; protected SteamVR_Behaviour_Skeleton handSkeleton; protected Animator handAnimator;
protected void Awake(){ renderModelLoadedAction = SteamVR_Events.RenderModelLoadedAction(OnRenderModelLoaded); InitializeHand(); InitializeController(); }
protected void InitializeHand(){} protected void InitializeController(){} protected virtual void DestroyHand(){} protected virtual void OnSkeletonActiveChange(SteamVR_Action_Skeleton changedAction, bool newState){} protected void OnEnable(){} protected void OnDisable(){} protected void OnDestroy(){}
public SteamVR_Behaviour_Skeleton GetSkeleton(){} public virtual void SetInputSource(SteamVR_Input_Sources newInputSource){} public virtual void OnHandInitialized(int deviceIndex){} public void MatchHandToTransform(Transform match){} public void SetHandPosition(Vector3 newPosition){} public void SetHandRotation(Quaternion newRotation){} public Vector3 GetHandPosition(){} public Quaternion GetHandRotation(){}
private void OnRenderModelLoaded(SteamVR_RenderModel loadedRenderModel, bool success){}
public void SetVisibility(bool state, bool overrideDefault=false){} public void Show(bool overrideDefault=false){} public void Hide(){} public virtual void SetMaterial(Material material){} public void SetControllerMaterial(Material material){} public void SetHandMaterial(Material material){} public void SetControllerVisibility(bool state, bool permanent=false){} public void SetHandVisibility(bool state, bool permanent=false){} public void IsHandVisible(){} public void IsControllerVisibile(){} public Transform GetBone(int boneIndex){} public Vector3 GetBonePosition(int boneIndex, bool local=false){} public Vector3 GetControllerPosition(string componentName=null){} public Quaternion GetBoneRotation(int boneIndex, bool local=false){} public void SetSkeletonRangeOfMotion(EVRSkeletalMotionRange newRangeOfMotion, float blendOverSeconds=0.1f){}
public EVRSkeletalMotionRange GetSkeletonRangeOfMotion{}
public void SetTemporarySkeletonRangeOfMotion(SkeletalMotionRangeChange temporaryRangeOfMotionChange, float blendOverSeconds=0.1f){} public void ResetTemporarySkeletonRangeOfMotion(float blendOverSeconds=0.1f){} public void SetAnimationState(int stateValue){} public void StopAnimation(){} private bool CheckAnimatorInit(){}
} //立钻哥哥:public class RenderModel:MonoBehaviour{}
} //立钻哥哥:namespace Valve.VR.InteractionSystem{} |
++++立钻哥哥:The hint system shows hints on the controllers.(提示系统在控制器上显示提示)
++++The hints are set up in a way where each button on the controller can be called out separately.(立钻哥哥:提示的设置方式是,控制器上的每个按钮都可以单独调用.)
++++There is also the ability to show text hints associated with each button.(立钻哥哥:还可以显示与每个按钮关联的文本提示.)
++++立钻哥哥:This hints are set up based on the render model of the controller.(这个提示是基于控制器的呈现模型建立的)
++++”SteamVR” provides a mapping from render model components to button IDs. This mapping is used to figure out what part of the controller corresponds to which button.(立钻哥哥:“SteamVR”提供了从渲染模型组件到按钮id的映射。这个映射用于找出控制器的哪个部分对应于哪个按钮)
++++Once a hint for a button is activated, that button will keep flashing on the controller model until the hint is turned off.(立钻哥哥:一旦一个按钮的提示被激活,该按钮将继续在控制器模型上闪烁,直到提示被关闭.)
++++Hints can be for buttons only or with an optional text hint associated with the button.(立钻哥哥:提示只能用于按钮,也可以与与按钮关联的可选文本提示一起使用。)
++++There are a few static methods that are used to interface with the hint system:(立钻哥哥:这里有一些静态方法,用于与提示系统接口:)
----[ShowButtonHint]: Flashes the specified button on the specified hand.(立钻哥哥:[ShowButtonHint]:在指定的手上闪烁指定的按钮.)
----[HideButtonHint]: Stops flashing the specified button on the specified hand.(立钻哥哥:[HideButtonHint]:停止在指定的手上闪烁指定的按钮.)
----[HideAllButtonHints]: Stops flashing all the buttons on the specified hand.(立钻哥哥:[hideallbuttonhint]:停止闪烁指定手的所有按钮.)
----[IsButtonHintActive]: Checked if a specified button is flashing on the specified hand.(立钻哥哥:[IsButtonHintActive]:检查指定的按钮是否在指定的手上闪烁.)
----[ShowTextHint]: Shows a text hint with the passed in string associated with the specified button on the specified hand.(立钻哥哥:[ShowTextHint]:显示与指定手的指定按钮相关联的传入字符串的文本提示.)
----[HideTextHint]: Hides the text hint for the specified hand on the specified button.(立钻哥哥:[HideTextHint]:隐藏指定按钮上指定手的文本提示.)
----[HideAllTextHints]: Hides all the text hints that are currently active on the specified hand.(立钻哥哥:[HideAllTextHints]:隐藏当前在指定指针上活动的所有文本提示.)
----[GetActiveHintText]: Gets the active hint text for a specified button.(立钻哥哥:[GetActiveHintText]:获取指定按钮的活动提示文本.)
//Purpose: Displays text and button hints on the controllers.(立钻哥哥:用途:在控制器上显示文本和按钮提示.) using UnityEngine; using System.Collections; using System.Collections.Generic; using UnityEngine.UI; using System.Text;
namespace Valve.VR.InteractionSystem{ public class ControllerButtonHints : MonoBehaviour{ public Material controllerMaterial; public Color flashColor = new Color(1.0f, 0.557f, 0.0f); public GameObject textHintPrefab;
private enum OffsetType{ Up, Right, Forward, Back }
//Info for each of the buttons.(立钻哥哥:每个按钮的信息) private class ActionHintInfo{ public string componentName; public List<MeshRenderer> renderers; public Transform localTransform;
public GameObject textHintObject; public Text text; }
private Dictionary<ISteamVR_Action_In_Source, ActionHintInfo> actionHintInfos;
SteamVR_Events.Action renderModelLoadedAction;
protected SteamVR_Input_Sources inputSource;
void Awake(){ renderModelLoadedAction = SteamVR_Events.RenderModelLoadedAction(OnRenderModelLoaded); colorID = Shader.PropertyToID(“_Color”); }
void Start(){ player = Player.instance; }
private void HintDebugLog(string msg){}
void OnDisable(){}
private void OnParentHandInputFocusLost(){ //Hide all the hints when the controller is no longer the primary attached object.(立钻哥哥:当控制器不再是主要附加对象时隐藏所有提示) HideAllButtonHints(); HideAllText(); }
public virtual void SetInputSource(SteamVR_Input_Sources newInputSource){}
//Gets called when the hand has been initialized and a render model has been set.(立钻哥哥:在初始化手并设置呈现模型时调用) private void OnHandInitialized(int deviceIndex){}
private Dictionary<string, Transform> componentTransformMap = new Dictionary<string, Transform>();
void OnRenderModelLoaded(SteamVR_RenderModel renderModel, bool suceess){}
private IEnumerator DoInitialize(SteamVR_RenderModel renderModel){} private void CreateAndAddButtonInfo(ISteamVR_Action_In action, SteamVR_Input_Sources inputSource){} private void ComputeTextEndTransforms(){} private void ShowButtonHint(params ISteamVR_Action_In_Source[] actions){} private void HideAllButtonHints(){} private void HideButtonHint(params ISteamVR_Action_In_Source[] actions){} private bool IsButtonHintActive(ISteamVR_Action_In_Source action){} private IEnumerator TestButtonHints(){} private IEnumerator TestTextHints(){}
void Update(){}
private void UpdateTextHint(ActionHintInfo hintInfo){}
private void Clear(){ renderers.Clear(); flashingRenderers.Clear(); }
private void ShowText(ISteamVR_Action_In_Source action, string text, bool highlightButton=true){} private void HideText(ISteamVR_Action_In_Source action){} private void HideAllText(){} private string GetActiveHintText(ISteamVR_Action_In_Source action){}
private static ControllerButtonHints GetControllerButtonHints(Hand hand){} private static void ShowButtonHint(Hand hand, params ISteamVR_Action_In_Source[] actions){} public static void HideButtonHint(Hand hand, params ISteamVR_Action_In_Source[] actions){} public static void HideAllButtonHints(Hand hand){} public static bool IsButtonHintActive(Hand hand, ISteamVR_Action_In_Source action){} public static void ShowTextHint(Hand hand, ISteamVR_Action_In_Source action, string text, bool highlightButton=true){} public static void HideTextHint(Hand hand, ISteamVR_Action_In_Source action){} public static void HideAllTextHints(Hand hand){} public static string GetActiveHintText(Hand hand, ISteamVR_Action_In_Source action){}
} //立钻哥哥:public class ControllerButtonHints:MonoBehaviour{}
} //立钻哥哥:namespace Valve.VR.InteractionSystem{} |
++++立钻哥哥:The “Longbow” is an example of a complex game mechanic created using the interaction system.(“长弓”是一个使用交互系统创建的复杂游戏机制的例子。)
++++The version included here is exactly the same one that we shipped in “The Lab”, including all the models, materials and sounds.(立钻哥哥:这里包含的版本与我们在“实验室”中提供的版本完全相同,包括所有的模型、材质和声音。)
++++The “Longbow” is built using the “ItemPackage” system. It is comprised of the “LongbowItemPackage” prefab which spawns the “Longbow” prefab in the main hand and the “ArrowHand” prefab in the other hand.(立钻哥哥:“长弓”是使用“ItemPackage”系统构建的。它由“LongbowItemPackage”预制块和“ArrowHand”预制块组成,前者在主手端生成“Longbow”预制块,后者在另一只手端生成“ArrowHand”预制块.)
++++The “ArrowHand” prefab then spawns a new arrow in the hand every time one is fired.(立钻哥哥:“ArrowHand”预置然后产生一个新的箭头在手中每次发射.)
++++All of the bow and arrow logic is present in the following scripts.(立钻哥哥:所有的弓箭逻辑都出现在下面的脚本中.)
++++立钻哥哥:It handles the logic of how the bow controls in nocked and un-nocked modes.(它处理的逻辑如何控制弓在弦和不在弦模式.)
++++It also keeps track of how far the bow string is pulled.(立钻哥哥:它还能记录弓弦被拉了多远.)
//Purpose: The bow.(立钻哥哥:目的:弓) using UnityEngine; using System.Collections; using System.Collections.Generic;
namespace Valve.VR.InteractionSystem{ [RequireComponent(typeof(Interactable))] public class Longbow : MonoBehaviour{ public enum Handedness{ Left, Right };
private Hand hand; private ArrowHand arrowHand;
SteamVR_Events.Action newPosesAppliedAction;
private void OnAttachedToHand(Hand attachedHand){} private void HandAttachedUpdate(Hand hand){}
public void ArrowReleased(){}
private IEnumerator ResetDrawAnim(){}
public float GetArrowVelocity(){} public void StartRotationLerp(){} public void StartNock(ArrowHand currentArrowHand){}
private void EvaluateHandedness(){} private void DoHandednessCheck(){}
public void ArrowInPosition(){} public void ReleaseNock(){}
private void ShutDown(){} private void OnHandFocusLost(Hand hand){} private void OnHandFocusAcquired(Hand hand){} private void OnDetachedFromHand(Hand hand){}
void OnDestroy(){}
} //立钻哥哥:public class Longbow:MonoBehaviour{}
} //立钻哥哥:namespace Valve.VR.InteractionSystem{} |
++++立钻哥哥:Handles nocking and firing the arrow based on its position and the controller buttons.(根据箭头的位置和控制器按钮处理搭接和发射弓箭。)
++++Handles spawing an arrow in the hand when needed.(立钻哥哥:处理在需要时在手上生成弓箭。)
//Purpose: The object attached to the player’s hand that spawns and fires the arrow.(立钻哥哥:目的:附加在玩家手上的物品,用来生成和发射箭) using UnityEngine; using System.Collections; using System.Collections.Generic;
namespace Valve.VR.InteractionSystem{ public class ArrowHand : MonoBehaviour{ private Hand hand; private Longbow bow;
private GameObject currentArrow; public GameObject arrowPrefab;
public SoundPlayOneShot arrowSpawnSound;
private List<GameObject> arrowList;
void Awake(){ allowTeleport = GetComponent<AllowTeleportWhileAttachedToHand>(); //allowTeleport.teleportAllowed = true; allowTeleport.overrideHoverLock = false; arrowList = new List<GameObject>(); }
private void OnAttachedToHand(Hand attachedHand){ hand = attachedHand; FindBow(); }
private GameObject InstantiateArrow(){ GameObject arrow = Instantiate(arrowPrefab, arrowNockTransform.position, arrowNockTransform.rotation) as GameObject; arrow.name = “立钻牌Bow Arrow”; arrow.transform.parent = arrowNockTransform; Util.ResetTransform(arrow.transform);
arrowList.Add(arrow);
while(arrowList.Count > maxArrowCount){ GameObject oldArrow = arrowList[0]; arrowList.RemoveAt(0); if(oldArrow){ Destroy(oldArrow); } }
return arrow; } //立钻哥哥:private GameObject InstantiateArrow(){}
private void HandAttachedUpdate(Hand hand){} private void OnDetachedFromHand(Hand hand){} private void FireArrow(){} private void EnableArrowSpawn(){} private IEnumerator ArrowReleaseHaptics(){} private void OnHandFocusLost(Hand hand){} private void OnHandFocusAcquired(Hand hand){} private void FindBow(){}
} //立钻哥哥:public class ArrowHand:MonoBehaviour{}
} //立钻哥哥:namespace Valve.VR.InteractionSystem{} |
++++立钻哥哥:The actual arrow that gets fired.(实际射出的箭。)
++++This script handles all the in-flight logic for the arrow including collision detection and deciding when to stick in to targets.(立钻哥哥:这个脚本处理弓箭的所有飞行中的逻辑,包括碰撞检测和决定何时插入目标。)
//Purpose: The arrow for the longbow.(立钻哥哥:用途:用于长弓的箭) using UnityEngine; using System.Collections;
namespace Valve.VR.InteractionSystem{ public class Arrow : MonoBehaviour{ public ParticleSystem glintParticle; public Rigidbody arrowHeadRB; public Rigidbody shaftRB;
public PlaySound hitGroundSound;
void Start(){ Physics.IgnoreCollision(shaftRB.GetComponent<Collider>(), Player.instance.headCollider); }
void FixedUpdate(){}
public void ArrowReleased(float inputVelocity){}
protected void SetCollisionMode(CollisionDetectionMode newMode, bool force=false){}
void OnCollisionEnter(Collision collision){}
private void StickInTarget(Collision collision, bool bSkipRayCast){}
void OnDestroy(){}
} //立钻哥哥:public class Arrow:MonoBehaviour{}
} //立钻哥哥:namespace Valve.VR.InteractionSystem{} |
++++立钻哥哥:Rotates the arrowhead randomly every time a new arrow is spawned.(每次生成一个新弓箭时,随机旋转箭头)
//Purpose: Sets a random rotation for the arrow head.(立钻哥哥:目的:设置箭头的随机旋转.) using UnityEngine; using System.Collections;
namespace Valve.VR.InteractionSystem{ public class ArrowheadRotation : MonoBehaviour{ void Start(){ float randX = Random.Range(0f, 180f); transform.localEulerAngles = new Vector3(randX, -90f, 90f); }
} //立钻哥哥:public class ArrowheadRotation:MonoBehaviour{}
} //立钻哥哥:namespace Valve.VR.InteractionSystem{} |
++++立钻哥哥:Plays the sounds of the bow string being pulled.(播放弓弦被拉的声音。)
++++The other scripts in the “Longbow” folder handle the logic for the “longbow” targets.(立钻哥哥:“Longbow”文件夹中的其他脚本处理“longbow”目标的逻辑)
//Purpose: Sounds for the bow pulling back.(立钻哥哥:用途:用于拉弓的声音) using UnityEngine; using System.Collections;
namespace Valve.VR.InteractionSystem{ public class SoundBowClick : MonoBehaviour{ public AudoClip bowClick; public AnimationCurve pitchTensionCurve; public float minPitch; public float maxPitch;
AudioSource thisAudioSource;
void Awake(){ thisAudioSource = GetComponent<AudioSource>(); }
public void PlayBowTensionClicks(float normalizedTension){ //Tension is a float between 0 and 1.1 being max tension and 0 being to tension.(立钻哥哥:张力是介于0和1.1之间的浮动,最大张力为0,最大张力为0) float y = pitchTensionCurve.Evaluate(normalizedTension);
thisAudioSource.pitch = ((maxPitch - minPitch) * y) + minPitch; thisAudioSource.PlayOneShot(bowClick); }
} //立钻哥哥:public class SoundBowClick:MonoBehaviour{}
} //立钻哥哥:namespace Valve.VR.InteractionSystem{} |
++++立钻哥哥:This is the script for a generic archery target.(这是一个普通射箭目标的脚本。)
++++It invokes a “UnityEvent” when hit by an arrow.(立钻哥哥:当被箭头击中时,它调用一个“UnityEvent”.)
//Purpose: Target that sends events when hit by an arrow.(立钻哥哥:目的:当被箭头击中时发送事件的目标.) using UnityEngine; using UnityEngine.Events; using System.Collections;
namespace Valve.VR.InteractionSystem{ public class ArcheryTarget : MonoBehaviour{ public UnityEvent onTakeDamage;
public bool onceOnly = false; public Transform targetCenter;
private void ApplyDamage(){} private void FireExposure(){} private void OnDamageTaken(){}
private IEnumerator FallDown(){ if(baseTransform){ Quaternion startingRot = baseTransform.rotation;
float startTiem = Time.time; float rotLerp = 0f;
while(rotLerp < 1){ rotLerp = Util.RemapNumberClamped(Time.time, startTime, startTime + fallTime, 0f, 1f); baseTransform.rotation = Quaternion.Lerp(startingRot, fallenDownTransform.rotation, rotLerp); yield return null; } } //立钻哥哥:if(baseTransform){}
yield return null; } //立钻哥哥:private IEnumerator FallDown(){}
} //立钻哥哥:public class ArcheryTarget:MonoBehaviour{}
} //立钻哥哥:namespace Valve.VR.InteractionSystem{} |
++++立钻哥哥:Indicates an object that can be set on fire. Once on fire this object can then spread fire when it comes in contact with another FireSource.(指示可以设置为着火的对象。一旦着火,当它与另一个FireSource接触时,这个对象就会传播火焰。)
//Purpose: This object can be set on fire.(立钻哥哥:用途:这个物体可以被点燃) using UnityEngine; using System.Collections;
namespace Valve.VR.InteractionSystem{ public class FireSource : MonoBehaviour{ public GameObject fireParticlePrefab; public bool startActive; private GameObject fireObject;
public ParticleSystem customParticles;
void Start(){} void Update(){} void OnTriggerEnter(Collider other){}
private void FireExposure(){} private void StartBurning(){}
} //立钻哥哥:public class FireSource:MonoBehaviour{}
} //立钻哥哥:namespace Valve.VR.InteractionSystem{} |
++++立钻哥哥:Used to make the archery target wobble.(用于使箭靶摇摆。)
//Purpose: Makes the weeble wobble.(立钻哥哥:目的:使weeble抖动) using UnityEngine; using System.Collections;
namespace Valve.VR.InteractionSystem{ public class ExplosionWobble : MonoBehaviour{ var rb = GetComponent<Rigidbody>(); if(rb){ rb.AddExplosionForce(2000, explosionPos, 10.0f); } } //立钻哥哥:public class ExplosionWobble:MonoBehaviour{}
} //立钻哥哥:namespace Valve.VR.InteractionSystem{} |
++++立钻哥哥:\Assets\SteamVR\InteractionSystem\Longbow\Scripts\Balloon.cs
//Purpose: BALLOONS!!(立钻哥哥:目的:气球!) using UnityEngine; using System.Collections;
namespace Valve.VR.InteractionSystem{ public class Balloon : MonoBehaviour{ public enum BalloonColor{ Red, OrangeRed, Orange, YellowOrange, Yellow, GreenYellow, Green, BlueGreen, Blue, VioletBlue, Violet, RedViolet, LightGray, DarkGray, Random } //立钻哥哥:public enum BalloonColor{}
private Hand hand;
public GameObject popPrefab;
private Rigidbody balloonRigidbody;
void Start(){ destructTime = Time.time + lifetime + Random.value; hand = GetComponentInParent<Hand>(); balloonRigidbody = GetComponent<Rigidbody>(); }
void Update(){}
private void SpawnParticles(GameObject particlePrefab, SoundPlayOneshot sound){}
void FixedUpdate(){}
private void ApplyDamage(){}
void OnCollisionEnter(Collision collision){}
public void SetColor(BalloonColor color){}
private Color BalloonColorToRGB(BalloonColor balloonColorVar){}
} //立钻哥哥:public class Balloon:MonoBehaviour{}
} //立钻哥哥:namespace Valve.VR.InteractionSystem{} |
++++立钻哥哥:\Assets\SteamVR\InteractionSystem\Longbow\Scripts\BalloonColliders.cs
//Purpose: Can be attached to the controller to collide with the balloons.(立钻哥哥:用途:可附加在控制器上与气球相撞) using UnityEngine; using System.Collections;
namespace Valve.VR.InteractionSystem{ public class BalloonColliders : MonoBehaviour{ public GameObject[] colliders; private Vector3[] colliderLocalPositions; private Quaternion[] colliderLocalRotations; private Rigidbody rb;
void Awake(){ rb = GetComponent<Rigidbody>();
colliderLocalPositions = new Vector3[colliders.Length]; colliderLocalRotations = new Quaternion[colliders.Length]; for(int i = 0; i < colliders.Length; ++i){ colliderLocalPositions[i] = colliders[i].transform.localPosition; colliderLocalRotations[i] = colliders[i].transform.localRotation;
colliders[i].name = gameObject.name + “.” +colliders[i].name; } } //立钻哥哥:void Awake(){}
void OnEnable(){} void OnDisable(){} void OnDestroy(){}
} //立钻哥哥:public class BalloonColliders:MonoBehaviour{}
} //立钻哥哥:namespace Valve.VR.InteractionSystem{} |
++++立钻哥哥:\Assets\SteamVR\InteractionSystem\Longbow\Scripts\BalloonHapticBump.cs
//Purpose: Provides a haptic bump when colliding with balloons.(立钻哥哥:用途:与气球碰撞时产生触感碰撞) using UnityEngine; using System.Collections;
namespace Valve.VR.InteractionSystem{ public class BalloonHapticBump : MonoBehaviour{ public GameObject physParent;
void OnCollisionEnter(Collision other){ Balloon contactBalloon = other.collider.GetComponentInParent<Balloon>(); if(contactBalloon != null){ Hand hand = physParent.GetComponentInParent<Hand>(); if(hand != null){ hand.TriggerHapticPulse(500); } } } //立钻哥哥:void OnCollisionEnter(Collision other){}
} //立钻哥哥:public class BalloonHapticBump:MonoBehaviour{}
} //立钻哥哥:namespace Valve.VR.InteractionSystem{} |
++++立钻哥哥:These scripts handle the logic for the balloons that spawn when the weeble is hit with an arrow.(这些脚本处理当weeble被箭头击中时生成的气球的逻辑)
//Purpose: Spawns balloons.(立钻哥哥:目的:产生气球) using UnityEngine; using System.Collections;
namespace Valve.VR.InteractionSystem{ public class BalloonSpawner : MonoBehaviour{ public GameObject balloonPrefab; public Transform spawnDirectionTransform;
void Start(){} void Update(){}
public GameObject SpawnBalloon(Balloon.BalloonColor color=Balloon.BalloonColor.Red){} public void SpawnBalloonFromEvent(int color){}
} //立钻哥哥:public class BalloonSpawner:MonoBehaviour{}
} //立钻哥哥:namespace Valve.VR.InteractionSystem{} |
++++立钻哥哥:There are a few classes that were created specifically to show some examples in the sample scene.(有几个类是专门为在示例场景中显示一些示例而创建的)
++++[ControllerHintsExample.cs]:This class shows how to use the hint system.(立钻哥哥:[ControllerHintsExample.cs]:这个类展示了如何使用提示系统.)
++++[InteractableExample.cs]:This class shows a very simple example of receiving and responding to messages from the hand.(立钻哥哥:[InteractableExample.cs]:这类显示了一个非常简单的示例接收来自手的响应信息.)
++++立钻哥哥:This class shows how to use the hint system.(这个类展示了如何使用提示系统。)
//Purpose: Demonstrates the use of the controller hint system.(立钻哥哥:用途:演示控制器提示系统的使用) using UnityEngine; using System.Collections; using Valve.VR;
namespace Valve.VR.InteractionSystem.Smaple{ public class ControllerHintsExample : MonoBehaviour{ private Coroutine buttonHintCoroutine; private Coroutine textHintCoroutine;
public void ShowButtonHints(Hand hand){} public void ShowTextHints(Hand hand){} public void DisableHints(){}
//Cycles through all the button hints on the controller.(立钻哥哥:循环遍历控制器上的所有按钮提示) private IEnumerator TestButtonHints(Hand hand){}
//Cycles through all the text hints on the controller.(立钻哥哥:循环遍历控制器上的所有文本提示) private IEnumerator TestTextHints(Hand hand){}
} //立钻哥哥:public class ControllerHintsExample:MonoBehaviour{}
} //立钻哥哥:namespace Valve.VR.InteractionSystem.Sample{} |
++++立钻哥哥:This class shows a very simple example of receiving and responding to message from the hand.(这个类展示了一个非常简单的接收和响应来自手的消息的例子)
//Purpose: Demonstrates how to create a simple interactable object.(立钻哥哥:目的:演示如何创建一个简单的可交互对象) using UnityEngine; using System.Collections;
namespace Valve.VR.InteractionSystem.Sample{ [RequireComponent(typeof(Interactable))] public class InteractableExample : MonoBehaviour{ private TextMesh generalText; private TextMesh hoveringText; private Vector3 oldPositon; private Quaternion oldRotation;
private Interactable interactable;
void Awake(){ var textMeshs = GetComponentsInChildren<TextMesh>(); generalText = textMeshs[0]; hoveringText = textMeshs[1];
generalText.text = “No Hand Hovering”; hoveringText.text = “Hovering: False”;
interactable = this.GetComponent<Interactable>(); } //立钻哥哥:void Awake(){}
private void OnHandHoverBegin(Hand hand){} private void OnHandHoverEnd(Hand hand){}
//Called every Update() while a Hand is hovering over this object.(立钻哥哥:当一只手悬停在此对象上时调用每个Update()) private void HandHoverUpdate(Hand hand){}
private void OnAttachedToHand(Hand hand){} private void OnDetachedFromHand(Hand hand){} private void HandAttachedUpdate(Hand hand){}
private bool lastHovering = false; private void Update(){}
private void OnHandFocusAcquired(Hand hand){} private void OnHandFocusLost(Hand hand){}
} //立钻哥哥:public class InteractableExample:MonoBehaviour{}
} //立钻哥哥:namespace Valve.VR.InteractionSystem.Sample{} |
##A.6、Skeleton Poser |
++++立钻哥哥:The “SteamVR_Skeleton_Poser” script is designed to function independently from the “SteamVR Interaction System” and can be added to your own systems, but the “SteamVR Interaction system” works with it right out of the box and is a great way to quickly try it out.(“SteamVR_Skeleton_Poser”脚本是独立于“SteamVR交互系统”而设计的,可以添加到您自己的系统中,但是“SteamVR交互系统”可以开箱即用地使用它,这是快速试用它的好方法。)
++++https://valvesoftware.github.io/steamvr_unity_plugin/articles/Skeleton-Poser.html
++++立钻哥哥:”SteamVR_Skeleton_Poses” are “ScriptableObjects” that contain a particular hand pose and some per-finger animation info.(“SteamVR_Skeleton_Poses”是“脚本化对象”,包含特定的手部姿势和一些每个手指的动画信息)
++++Multiple poses can be added to and modified via the “SteamVR_Skeleton_Poser” script with its handy UI. You can add any number of poses to one Poser, but you will likely only need a few at most. Using the buttons in the pose editor, new poses can be created, pose data can be copied between poses, pose data can be mirrored, poses can be reset to a variety of bases, and changes to skeletons in the scene view can be saved as changes to a pose. You can also add per-finger additive animation via the finger movement dropdowns. This lets the fingers move based on the skeleton input while remaining constrained to the pose. There are several types of finger movement:(立钻哥哥:多个姿势可以通过“SteamVR_Skeleton_Poser”脚本及其方便的UI添加和修改。你可以在一个姿态的动作中加入任意数量的姿势,但你可能最多只需要几个。使用姿态编辑器中的按钮,可以创建新的姿态,可以在不同的姿态之间复制姿态数据,可以镜像姿态数据,可以将姿态重置为各种基底,还可以将场景视图中对骨骼的更改保存为对姿态的更改。您还可以通过手指移动下拉菜单添加每个手指的附加动画。这使得手指可以根据骨骼输入移动,同时保持姿势不变。手指运动有几种类型:)
----[Static]: on finger movement. Only use pose.(立钻哥哥:[静态]:手指运动。只使用姿势.)
----[Free]: free finger movement. Ignore pose.(立钻哥哥:[自由]:手指自由活动。忽略的姿势.)
----[Extend]: fingers can lift up to a fully extended position, but not curl any farther down than where the pose has them.(立钻哥哥:[伸展]:手指可以抬起到一个完全伸展的位置,但不能弯曲到比这个姿势下更深的地方.)
----[Contract]: fingers can curl to a fully contracted position, but cannot open any further than where the pose has them.(立钻哥哥:[收缩]:手指可以弯曲成完全收缩的姿势,但不能在超过这个姿势的任何地方张开.)
++++Using the “Poser’s Blending Editor” tab, you can set up blending behaviours to mix and stack multiple poses in complex ways. Think of the blending editor as an animator controller, and the poses as animations. There are three types of blending behaviours you can add: Manual, analog action, or boolean action. Manual behaviours will have to be driven by code, with an easy call of: (立钻哥哥:使用“Poser的混合编辑器”选项卡,您可以设置混合行为,以复杂的方式混合和堆叠多个姿势。将混合编辑器看作是动画控制器,而将姿态看作是动画。您可以添加三种类型的混合行为:手动操作、模拟操作或布尔操作。手动行为将必须由代码驱动,很容易调用:)
Poser.SetBlendingBehaviourValue(string behaviourName, float value); |
++++Analog and boolean action behaviours, on the other hand, are automatically driven by a chosen action. The smoothing value will be the speed of smoothing applied to them, with 0 for none. Smoothing is not required for analog actions, but it recommended for “Boolean-driven” behaviours as they will look much smoother.(立钻哥哥:另一方面,模拟和布尔操作行为是由选择的操作自动驱动的。平滑值将是应用于它们的平滑速度,0表示没有。平滑不是模拟动作所必需的,但它推荐“布尔驱动”的行为,因为它们看起来会更平滑.)
++++立钻哥哥:As also mentioned before, the “SteamVR_Skeleton_Poser” script is designed to funciton independently from the “SteamVR Interaction System”. If you are using the “SteamVR_Behaviour_Skeleton” script to animate your hand, you can tell it to blend to the output of a particular poser with a call of “BlendToPoser()”;(立钻哥哥:如前所述,“SteamVR_Skeleton_Poser”脚本被设计成独立于“SteamVR交互系统”运行。如果您使用“SteamVR_Behavior _Skeleton”脚本使您的手动起来,您可以通过调用“BlendToPoser()”告诉它混合到特定poser的输出.)
++++If you are using a different solution to animate your skeleton, the “Poser” can generate poses on command in the format of the “SteamVR_Skeleton_PoseSnapshot” dataclass, which holds object offset and position/rotation for all the bones. Call “poser.GetBlendedPose”, passing either a “SteamVR_Behaviour_Skeleton” or a “SteamVR_Action_Skeleton” and “SteamVR_Input_Sources” hand identifier. This will give you a fully composited pose according to the various behaviours and options on that particular poser, which you can apply freely to your skeleton.(立钻哥哥:如果您使用不同的解决方案来动画您的骨骼,“Poser”可以根据命令生成“SteamVR_Skeleton_PoseSnapshot”数据类格式的pose,该数据类保存所有骨骼的对象偏移量和位置/旋转。调用”poser.GetBlendedPose”,传递一个“Steamvr_Behavior_Skeleton”或一个“SteamVR_Action_Skeleton”和“SteamVR_Input_Sources”手动标识符。这将给你一个完全合成的姿势,根据不同的行为和选择的特定姿势,你可以自由地应用到你的骨骼.)
using System; using System.Threading; using UnityEngine; using UnityEngine.Events; using Valve.VR;
namespace Valve.VR{ //This component simplifies the use of Pose actions. Adding it to a gameobject will auto set that transform’s position and rotation every update to match the pose. Advanced velocity estimation is handled through a buffer of the last 30 updates.(立钻哥哥:这个组件简化了姿势动作的使用。将其添加到gameobject将自动设置转换位置并在每次更新时旋转以匹配该姿态。高级速度估计是通过最近30次更新的缓冲区来处理的) public class SteamVR_Behaviour_Pose : MonoBehaviour{ public SteamVR_Action_Pose poseAction = SteamVR_Input.GetAction<SteamVR_Action_Pose>(“Pose”); public SteamVR_Input_Sources inputSource; public Transform origin;
protected virtual void Start(){} protected virtual void OnEnable(){} protected virtual void OnDisable(){}
private void SteamVR_Behaviour_Pose_OnUpdate(SteamVR_Action_Pose fromAction, SteamVR_Input_Sources fromSource){} protected virtual void UpdateTransform(){} private void SteamVR_Behaviour_Pose_OnChange(SteamVR_Action_Pose fromAction, SteamVR_Input_Sources fromSources){} protected virtual void OnDeviceConnectedChanged(SteamVR_Action_Pose changedAction, SteamVR_Input_Sources changedSource, bool connected){} protected virtual void OnTrackingChanged(SteamVR_Action_Pose changedAction, SteamVR_Input_Sources changedSource, ETrackingResult trackingChanged){} protected virtual void CheckDeviceIndex(){}
//Returns the device index of the device bound to the pose.(立钻哥哥:返回绑定到姿势的设备的设备索引) public int GetDeviceIndex(){}
//Returns the current velocity of the pose (as of the last update).(立钻哥哥:返回姿势的当前速度(截至上次更新时)) public Vector3 GetAngularVelocity(){}
//Returns the velocities of the pose at the time specified. Can predict in the future or return past values.(立钻哥哥:返回指定时刻的姿势速度。可以预测未来或返回过去的值) public bool GetVelocitiesAtTimeOffset(float secondsFromNow, out Vector3 velocity, out Vector3 angularVelocity){}
//Uses previously recorded values to find the peak speed of the pose and returns the corresponding velocity and angular velocity.(立钻哥哥:使用之前记录的值来查找姿势的峰值速度,并返回相应的速度和角速度) public void GetEstimatedPeakVelocites(out Vector3 velocity, out Vector3 angularVelocity){}
protected int lastFrameUpdated. protected void UpdateHistoryBuffer(){}
//Gets the localized name of the device that the action corresponds to.(立钻哥哥:获取操作对应的设备的本地化名称) public string GetLocalizedName(params EVRInputStringBits[] localizeParts){}
public deleate void ActiveChangeHandler(SteamVR_Behaviour_Pose fromAction, SteamVR_Input_Sources fromSource, bool active){} public delegate void ChangeHandler(SteamVR_Behaviour_Pose fromAction, SteamVR_Input_Sources fromSouce){} public delegate void UpdateHandler(SteamVR_Behaviour_Pose fromAction, SteamVR_Input_Sources fromSource){} public delegate void TrackingChangeHandler(SteamVR_Behaviour_Pose fromAction, SteamVR_Input_Sources fromSource, ETrackingResult trackingState){} public delegate void ValidPoseChangeHandler(SteamVR_Behaviour_Pose fromAction, SteamVR_Input_Sources fromSource, bool validPose){} public delegate void DeviceConnectedChangeHandler(SteamVR_Behaviour_Pose fromAction, SteamVR_Input_Sources fromSource, bool deviceConnected){} public delegate void DeviceIndexChangedHandler(SteamVR_Behaviour_Pose fromAction, SteamVR_Input_Sources fromSource, int newDeviceIndex){}
} //立钻哥哥:public class SteamVR_Behaviour_Pose:MonoBehaviour{}
} //立钻哥哥:namespace Valve.VR{} |
++++SteamVR2.2.0快速入门:https://blog.csdn.net/VRunSoftYanlz/article/details/88833579
++++SteamVR2.2.0交互系统:https://blog.csdn.net/VRunSoftYanlz/article/details/89199778
++++SteamVR2.2.0传送机制:https://blog.csdn.net/VRunSoftYanlz/article/details/89390866
++++SteamVR:https://blog.csdn.net/vrunsoftyanlz/article/category/8582642
【XR游戏开发QQ群:784477094】
++立钻哥哥推荐的拓展学习链接(Link_Url):
立钻哥哥推荐的拓展学习链接(Link_Url) |
++++立钻哥哥Unity 学习空间: http://blog.csdn.net/VRunSoftYanlz/
++++虚拟现实VR资讯: https://blog.csdn.net/VRunSoftYanlz/article/details/89165846
++++HTC_VIVE开发基础:https://blog.csdn.net/VRunSoftYanlz/article/details/81989970
++++Oculus杂谈:https://blog.csdn.net/VRunSoftYanlz/article/details/82469850
++++Oculus安装使用:https://blog.csdn.net/VRunSoftYanlz/article/details/82718982
++++Unity+SteamVR=>VR:https://blog.csdn.net/VRunSoftYanlz/article/details/88809370
++++Unity减少VR晕眩症:https://blog.csdn.net/VRunSoftYanlz/article/details/89115518
++++SteamVR简介:https://blog.csdn.net/VRunSoftYanlz/article/details/86484254
++++SteamVR脚本功能分析:https://blog.csdn.net/VRunSoftYanlz/article/details/86531480
++++SteamVR2.0开发指南:https://blog.csdn.net/VRunSoftYanlz/article/details/86618187
++++SteamVR2.2.0开发指南:https://blog.csdn.net/VRunSoftYanlz/article/details/88784527
++++SteamVR2.2.0快速入门:https://blog.csdn.net/VRunSoftYanlz/article/details/88833579
++++SteamVR2.2.0交互系统:https://blog.csdn.net/VRunSoftYanlz/article/details/89199778
++++SteamVR2.2.0传送机制:https://blog.csdn.net/VRunSoftYanlz/article/details/89390866
++++SteamVR2.2.0官方教程:https://blog.csdn.net/VRunSoftYanlz/article/details/89324067
++++SteamVR/Extras:https://blog.csdn.net/VRunSoftYanlz/article/details/86584108
++++SteamVR/Input:https://blog.csdn.net/VRunSoftYanlz/article/details/86601950
++++OpenXR简介:https://blog.csdn.net/VRunSoftYanlz/article/details/85726365
++++VRTK杂谈:https://blog.csdn.net/VRunSoftYanlz/article/details/82562993
++++VRTK快速入门(杂谈):https://blog.csdn.net/VRunSoftYanlz/article/details/82955267
++++VRTK官方示例(目录):https://blog.csdn.net/VRunSoftYanlz/article/details/82955410
++++VRTK代码结构(目录):https://blog.csdn.net/VRunSoftYanlz/article/details/82780085
++++VRTK(SceneResources):https://blog.csdn.net/VRunSoftYanlz/article/details/82795400
++++VRTK_ControllerEvents:https://blog.csdn.net/VRunSoftYanlz/article/details/83099512
++++VRTK_InteractTouch:https://blog.csdn.net/VRunSoftYanlz/article/details/83120220
++++虚拟现实行业应用:https://blog.csdn.net/VRunSoftYanlz/article/details/88360157
++++Steam平台上的VR:https://blog.csdn.net/VRunSoftYanlz/article/details/88960085
++++Steam平台热销VR:https://blog.csdn.net/VRunSoftYanlz/article/details/89007741
++++VR实验:以太网帧的构成:https://blog.csdn.net/VRunSoftYanlz/article/details/82598140
++++实验四:存储器扩展实验:https://blog.csdn.net/VRunSoftYanlz/article/details/87834434
++++FrameVR示例V0913:https://blog.csdn.net/VRunSoftYanlz/article/details/82808498
++++FrameVR示例V1003:https://blog.csdn.net/VRunSoftYanlz/article/details/83066516
++++SwitchMachineV1022:https://blog.csdn.net/VRunSoftYanlz/article/details/83280886
++++PlaySceneManagerV1022:https://blog.csdn.net/VRunSoftYanlz/article/details/83280886
++++Unity5.x用户手册:https://blog.csdn.net/VRunSoftYanlz/article/details/81712741
++++Unity面试题ABC:https://blog.csdn.net/vrunsoftyanlz/article/details/78630687
++++Unity面试题D:https://blog.csdn.net/VRunSoftYanlz/article/details/78630838
++++Unity面试题E:https://blog.csdn.net/vrunsoftyanlz/article/details/78630913
++++Unity面试题F:https://blog.csdn.net/VRunSoftYanlz/article/details/78630945
++++Cocos2dx面试题:https://blog.csdn.net/VRunSoftYanlz/article/details/78630967
++++禅道[zentao]:https://blog.csdn.net/VRunSoftYanlz/article/details/83964057
++++Lua快速入门篇(Xlua拓展):https://blog.csdn.net/VRunSoftYanlz/article/details/81173818
++++Lua快速入门篇(XLua教程):https://blog.csdn.net/VRunSoftYanlz/article/details/81141502
++++Lua快速入门篇(基础概述):https://blog.csdn.net/VRunSoftYanlz/article/details/81041359
++++框架知识点:https://blog.csdn.net/VRunSoftYanlz/article/details/80862879
++++游戏框架(UI框架夯实篇):https://blog.csdn.net/vrunsoftyanlz/article/details/80781140
++++游戏框架(初探篇):https://blog.csdn.net/VRunSoftYanlz/article/details/80630325
++++.Net框架设计:https://blog.csdn.net/VRunSoftYanlz/article/details/87401225
++++从零开始学架构:https://blog.csdn.net/VRunSoftYanlz/article/details/88095895
++++设计模式简单整理:https://blog.csdn.net/vrunsoftyanlz/article/details/79839641
++++专题:设计模式(精华篇):https://blog.csdn.net/VRunSoftYanlz/article/details/81322678
++++U3D小项目参考:https://blog.csdn.net/vrunsoftyanlz/article/details/80141811
++++Unity小游戏算法分析:https://blog.csdn.net/VRunSoftYanlz/article/details/87908365
++++Unity案例(Vehicle):https://blog.csdn.net/VRunSoftYanlz/article/details/82355876
++++UML类图:https://blog.csdn.net/vrunsoftyanlz/article/details/80289461
++++PowerDesigner简介:https://blog.csdn.net/VRunSoftYanlz/article/details/86500084
++++Unity知识点0001:https://blog.csdn.net/vrunsoftyanlz/article/details/80302012
++++Unity知识点0008:https://blog.csdn.net/VRunSoftYanlz/article/details/81153606
++++U3D_Shader编程(第一篇:快速入门篇):https://blog.csdn.net/vrunsoftyanlz/article/details/80372071
++++U3D_Shader编程(第二篇:基础夯实篇):https://blog.csdn.net/vrunsoftyanlz/article/details/80372628
++++Unity引擎基础:https://blog.csdn.net/vrunsoftyanlz/article/details/78881685
++++Unity面向组件开发:https://blog.csdn.net/vrunsoftyanlz/article/details/78881752
++++Unity物理系统:https://blog.csdn.net/vrunsoftyanlz/article/details/78881879
++++Unity2D平台开发:https://blog.csdn.net/vrunsoftyanlz/article/details/78882034
++++UGUI基础:https://blog.csdn.net/vrunsoftyanlz/article/details/78884693
++++UGUI进阶:https://blog.csdn.net/vrunsoftyanlz/article/details/78884882
++++UGUI综合:https://blog.csdn.net/vrunsoftyanlz/article/details/78885013
++++Unity动画系统基础:https://blog.csdn.net/vrunsoftyanlz/article/details/78886068
++++Unity动画系统进阶:https://blog.csdn.net/vrunsoftyanlz/article/details/78886198
++++Navigation导航系统:https://blog.csdn.net/vrunsoftyanlz/article/details/78886281
++++Unity特效渲染:https://blog.csdn.net/vrunsoftyanlz/article/details/78886403
++++Unity数据存储:https://blog.csdn.net/vrunsoftyanlz/article/details/79251273
++++Unity中Sqlite数据库:https://blog.csdn.net/vrunsoftyanlz/article/details/79254162
++++WWW类和协程:https://blog.csdn.net/vrunsoftyanlz/article/details/79254559
++++Unity网络:https://blog.csdn.net/vrunsoftyanlz/article/details/79254902
++++Unity资源加密:https://blog.csdn.net/VRunSoftYanlz/article/details/87644514
++++PhotonServer简介:https://blog.csdn.net/VRunSoftYanlz/article/details/86652770
++++编写Photon游戏服务器:https://blog.csdn.net/VRunSoftYanlz/article/details/86682935
++++C#事件:https://blog.csdn.net/vrunsoftyanlz/article/details/78631267
++++C#委托:https://blog.csdn.net/vrunsoftyanlz/article/details/78631183
++++C#集合:https://blog.csdn.net/vrunsoftyanlz/article/details/78631175
++++C#泛型:https://blog.csdn.net/vrunsoftyanlz/article/details/78631141
++++C#接口:https://blog.csdn.net/vrunsoftyanlz/article/details/78631122
++++C#静态类:https://blog.csdn.net/vrunsoftyanlz/article/details/78630979
++++C#中System.String类:https://blog.csdn.net/vrunsoftyanlz/article/details/78630945
++++C#数据类型:https://blog.csdn.net/vrunsoftyanlz/article/details/78630913
++++Unity3D默认的快捷键:https://blog.csdn.net/vrunsoftyanlz/article/details/78630838
++++游戏相关缩写:https://blog.csdn.net/vrunsoftyanlz/article/details/78630687
++++UnityAPI.Rigidbody刚体:https://blog.csdn.net/VRunSoftYanlz/article/details/81784053
++++UnityAPI.Material材质:https://blog.csdn.net/VRunSoftYanlz/article/details/81814303
++++UnityAPI.Android安卓:https://blog.csdn.net/VRunSoftYanlz/article/details/81843193
++++UnityAPI.AndroidJNI安卓JNI:https://blog.csdn.net/VRunSoftYanlz/article/details/81879345
++++UnityAPI.Transform变换:https://blog.csdn.net/VRunSoftYanlz/article/details/81916293
++++UnityAPI.WheelCollider轮碰撞器:https://blog.csdn.net/VRunSoftYanlz/article/details/82356217
++++UnityAPI.Resources资源:https://blog.csdn.net/VRunSoftYanlz/article/details/83155518
++++JSON数据结构:https://blog.csdn.net/VRunSoftYanlz/article/details/82026644
++++CocosStudio快速入门:https://blog.csdn.net/VRunSoftYanlz/article/details/82356839
++++Unity企业内训(目录):https://blog.csdn.net/VRunSoftYanlz/article/details/82634668
++++Unity企业内训(第1讲):https://blog.csdn.net/VRunSoftYanlz/article/details/82634733
++++Unity企业内训(第2讲):https://blog.csdn.net/VRunSoftYanlz/article/details/82861180
++++Unity企业内训(第3讲):https://blog.csdn.net/VRunSoftYanlz/article/details/82927699
++++Unity企业内训(第4讲):https://blog.csdn.net/VRunSoftYanlz/article/details/83479776
++++Unity企业内训(第5讲):https://blog.csdn.net/VRunSoftYanlz/article/details/83963811
++++Unity企业内训(第6讲):https://blog.csdn.net/VRunSoftYanlz/article/details/84207696
++++钻哥带您了解产品原型:https://blog.csdn.net/VRunSoftYanlz/article/details/87303828
++++插件
++++计算机组成原理(教材篇):https://blog.csdn.net/VRunSoftYanlz/article/details/82719129
++++5G接入:云计算和雾计算:https://blog.csdn.net/VRunSoftYanlz/article/details/88372718
++++云计算通俗讲义:https://blog.csdn.net/VRunSoftYanlz/article/details/88652803
++++立钻哥哥Unity 学习空间: http://blog.csdn.net/VRunSoftYanlz/
--_--VRunSoft:lovezuanzuan--_--ww4ww--_--