GitHub
6 年前
当前提交
75af07c9
共有 263 个文件被更改,包括 9969 次插入 和 447 次删除
-
2Assets/LWRPSupport/ARKitLWRPShader.shader
-
2Assets/LWRPSupport/LWRPBackgroundRenderer.cs
-
2Assets/LWRPSupport/LWRPBackgroundRendererAsset.asset
-
28Assets/LWRPSupport/LWRPBeforeCameraRender.cs
-
6Assets/LWRPSupport/Unity.XR.ARFoundation.LWRPSupport.asmdef
-
8Assets/Materials/FeatheredPlaneMaterial.mat
-
7Assets/Materials/LWRPCube.mat
-
7Assets/Materials/LWRPPlane.mat
-
8Assets/Materials/PlacedCubeMaterial.mat
-
367Assets/Scenes/LightEstimation.unity
-
48Assets/Scenes/SampleLWRPScene.unity
-
40Assets/Scenes/SimpleAR.unity
-
30Assets/Scripts/ARFeatheredPlaneMeshVisualizer.cs
-
87Assets/Scripts/LightEstimation.cs
-
97Assets/Scripts/LightEstimationUI.cs
-
43Assets/Scripts/PlaceOnPlane.cs
-
5Assets/link.xml
-
39Packages/manifest.json
-
12ProjectSettings/EditorBuildSettings.asset
-
44ProjectSettings/EditorSettings.asset
-
9ProjectSettings/GraphicsSettings.asset
-
51ProjectSettings/ProjectSettings.asset
-
2ProjectSettings/ProjectVersion.txt
-
1ProjectSettings/UnityConnectSettings.asset
-
13README.md
-
130Assets/Scenes/Plane Detection/FeatheredPlanes.unity
-
16Assets/ARKitSettings.asset
-
8Assets/ARKitSettings.asset.meta
-
8Assets/Animation.meta
-
63Assets/LWRPSupport/LWRPBackgroundRenderPass.cs
-
11Assets/LWRPSupport/LWRPBackgroundRenderPass.cs.meta
-
61Assets/LWRPSupport/LWRPBackgroundRendererAsset.cs
-
78Assets/Materials/FeaturePointMaterial.mat
-
8Assets/Materials/FeaturePointMaterial.mat.meta
-
76Assets/Materials/TriColor.mat
-
8Assets/Materials/TriColor.mat.meta
-
76Assets/Materials/XMaterial.mat
-
8Assets/Materials/XMaterial.mat.meta
-
76Assets/Materials/YMaterial.mat
-
8Assets/Materials/YMaterial.mat.meta
-
76Assets/Materials/ZMaterial 1.mat
-
8Assets/Materials/ZMaterial 1.mat.meta
-
76Assets/Materials/ZMaterial.mat
-
8Assets/Materials/ZMaterial.mat.meta
-
76Assets/Materials/sloth_all_1001_AlbedoTransparency.mat
-
9Assets/Materials/sloth_all_1001_AlbedoTransparency.mat.meta
-
8Assets/Meshes.meta
-
170Assets/Prefabs/AR Feathered Plane Fade.prefab
-
8Assets/Prefabs/AR Feathered Plane Fade.prefab.meta
-
114Assets/Prefabs/AR Placed Sphere.prefab
-
8Assets/Prefabs/AR Placed Sphere.prefab.meta
-
1001Assets/Prefabs/AR Point Cloud Visualizer.prefab
-
8Assets/Prefabs/AR Point Cloud Visualizer.prefab.meta
-
243Assets/Prefabs/FaceBlendShapes.prefab
-
8Assets/Prefabs/FaceBlendShapes.prefab.meta
-
110Assets/Prefabs/FaceMeshPrefab.prefab
-
8Assets/Prefabs/FaceMeshPrefab.prefab.meta
-
312Assets/Prefabs/FacePrefab.prefab
-
8Assets/Prefabs/FacePrefab.prefab.meta
-
1001Assets/Scenes/ARWorldMap.unity
-
7Assets/Scenes/ARWorldMap.unity.meta
-
1001Assets/Scenes/CameraImage.unity
-
7Assets/Scenes/CameraImage.unity.meta
-
8Assets/Scenes/FaceTracking.meta
-
8Assets/Scenes/Plane Detection.meta
-
8Assets/Scenes/UX.meta
-
200Assets/Scripts/ARFaceArkitBlendShapeVisualizer.cs
-
11Assets/Scripts/ARFaceArkitBlendShapeVisualizer.cs.meta
-
311Assets/Scripts/ARWorldMapController.cs
-
11Assets/Scripts/ARWorldMapController.cs.meta
-
89Assets/Scripts/CameraConfigController.cs
-
11Assets/Scripts/CameraConfigController.cs.meta
-
51Assets/Scripts/DisableVerticalPlanes.cs
-
11Assets/Scripts/DisableVerticalPlanes.cs.meta
-
65Assets/Scripts/PlaceMultipleObjectsOnPlane.cs
-
11Assets/Scripts/PlaceMultipleObjectsOnPlane.cs.meta
-
69Assets/Scripts/PlaneDetectionController.cs
-
11Assets/Scripts/PlaneDetectionController.cs.meta
-
36Assets/Scripts/SetTargetFramerate.cs
-
11Assets/Scripts/SetTargetFramerate.cs.meta
-
118Assets/Scripts/TestCameraImage.cs
-
11Assets/Scripts/TestCameraImage.cs.meta
-
8Assets/Scripts/UX.meta
-
3Assets/Textures/FeaturePoint.png
-
88Assets/Textures/FeaturePoint.png.meta
-
75Assets/Textures/PlanePatternDot.png
-
88Assets/Textures/PlanePatternDot.png.meta
-
1001Assets/Textures/sloth_all_1001_AlbedoTransparency.png
-
76Assets/Textures/sloth_all_1001_AlbedoTransparency.png.meta
-
1001Assets/Textures/sloth_all_1001_MetallicSmoothness.png
-
76Assets/Textures/sloth_all_1001_MetallicSmoothness.png.meta
-
1001Assets/Textures/sloth_all_1001_Normal.png
-
76Assets/Textures/sloth_all_1001_Normal.png.meta
-
4Assets/Textures/tricolor.png
|
|||
using UnityEngine.Experimental.Rendering; |
|||
using UnityEngine.Rendering; |
|||
public class LWRPBeforeCameraRender : MonoBehaviour, LightweightPipeline.IBeforeCameraRender |
|||
public class LWRPBeforeCameraRender : MonoBehaviour, IBeforeRender |
|||
public void ExecuteBeforeCameraRender(ScriptableRenderContext context, Camera currentCamera, LightweightPipeline.PipelineSettings pipelineSettings, |
|||
ScriptableRenderer currentRenderer) |
|||
/// <summary>
|
|||
/// Create, setup and return a ScriptableRenderPass that will blit the pass-thru video when this GameObject is rendered.
|
|||
/// </summary>
|
|||
/// <param name="baseDescriptor">RenderTextureDescriptor for this pass. </param>
|
|||
/// <param name="colorHandle">RenderTargetHandle for color buffer.</param>
|
|||
/// <param name="depthHandle">RenderTargetHandle for depth buffer.</param>
|
|||
/// <param name="clearFlag">ClearFlag used for rendering.</param>
|
|||
/// <returns></returns>
|
|||
public ScriptableRenderPass GetPassToEnqueue(RenderTextureDescriptor baseDescriptor, RenderTargetHandle colorHandle, |
|||
RenderTargetHandle depthHandle, ClearFlag clearFlag) |
|||
if (blitMaterial == null) |
|||
return; |
|||
|
|||
var cmd = CommandBufferPool.Get(k_ARBlitTag); |
|||
|
|||
cmd.Blit(null, BuiltinRenderTextureType.CameraTarget, blitMaterial); |
|||
|
|||
context.ExecuteCommandBuffer(cmd); |
|||
CommandBufferPool.Release(cmd); |
|||
var lwrpBackgroundRenderPass = new LWRPBackgroundRenderPass(); |
|||
lwrpBackgroundRenderPass.Setup(blitMaterial, colorHandle.Identifier(), depthHandle.Identifier(), |
|||
baseDescriptor); |
|||
return lwrpBackgroundRenderPass; |
|||
} |
|||
} |
|||
} |
|
|||
using UnityEngine; |
|||
using UnityEngine.XR.ARFoundation; |
|||
|
|||
/// <summary>
|
|||
/// A component that can be used to access the most
|
|||
/// recently received light estimation information
|
|||
/// for the physical environment as observed by an
|
|||
/// AR device.
|
|||
/// </summary>
|
|||
Light m_Light; |
|||
/// <summary>
|
|||
/// The estimated brightness of the physical environment, if available.
|
|||
/// </summary>
|
|||
public float? brightness { get; private set; } |
|||
public float? brightness { get; private set; } |
|||
/// <summary>
|
|||
/// The estimated color temperature of the physical environment, if available.
|
|||
/// </summary>
|
|||
public float? colorTemperature { get; private set; } |
|||
public float? colorTemperature { get; private set; } |
|||
/// <summary>
|
|||
/// The estimated color correction value of the physical environment, if available.
|
|||
/// </summary>
|
|||
public Color? colorCorrection { get; private set; } |
|||
public Color? colorCorrection { get; private set; } |
|||
void Awake () |
|||
{ |
|||
m_Light = GetComponent<Light>(); |
|||
} |
|||
void Awake () |
|||
{ |
|||
m_Light = GetComponent<Light>(); |
|||
ARSubsystemManager.cameraFrameReceived += FrameChanged; |
|||
} |
|||
void OnEnable() |
|||
{ |
|||
ARSubsystemManager.cameraFrameReceived += FrameChanged; |
|||
} |
|||
void FrameChanged(ARCameraFrameEventArgs args) |
|||
{ |
|||
if (args.lightEstimation.averageBrightness.HasValue) |
|||
{ |
|||
brightness = args.lightEstimation.averageBrightness.Value; |
|||
m_Light.intensity = brightness.Value; |
|||
} |
|||
void OnDisable() |
|||
{ |
|||
ARSubsystemManager.cameraFrameReceived -= FrameChanged; |
|||
} |
|||
if (args.lightEstimation.averageColorTemperature.HasValue) |
|||
{ |
|||
colorTemperature = args.lightEstimation.averageColorTemperature.Value; |
|||
m_Light.colorTemperature = colorTemperature.Value; |
|||
} |
|||
|
|||
if (args.lightEstimation.colorCorrection.HasValue) |
|||
{ |
|||
colorCorrection = args.lightEstimation.colorCorrection.Value; |
|||
m_Light.color = colorCorrection.Value; |
|||
} |
|||
} |
|||
} |
|||
void FrameChanged(ARCameraFrameEventArgs args) |
|||
{ |
|||
if (args.lightEstimation.averageBrightness.HasValue) |
|||
{ |
|||
brightness = args.lightEstimation.averageBrightness.Value; |
|||
m_Light.intensity = brightness.Value; |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
if (args.lightEstimation.averageColorTemperature.HasValue) |
|||
{ |
|||
colorTemperature = args.lightEstimation.averageColorTemperature.Value; |
|||
m_Light.colorTemperature = colorTemperature.Value; |
|||
} |
|||
|
|||
if (args.lightEstimation.colorCorrection.HasValue) |
|||
{ |
|||
colorCorrection = args.lightEstimation.colorCorrection.Value; |
|||
m_Light.color = colorCorrection.Value; |
|||
} |
|||
} |
|||
|
|||
|
|||
Light m_Light; |
|||
} |
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using UnityEngine; |
|||
/// <summary>
|
|||
/// A simple UI controller to display light estimation information.
|
|||
/// </summary>
|
|||
[SerializeField] |
|||
Text m_BrightnessVal; |
|||
|
|||
[SerializeField] |
|||
Text m_ColorTempVal; |
|||
|
|||
[SerializeField] |
|||
Text m_ColorCorrectVal; |
|||
[Tooltip("The UI Text element used to display the estimated brightness in the physical environment.")] |
|||
[SerializeField] |
|||
Text m_BrightnessText; |
|||
|
|||
/// <summary>
|
|||
/// The UI Text element used to display the estimated brightness value.
|
|||
/// </summary>
|
|||
public Text brightnessText |
|||
{ |
|||
get { return m_BrightnessText; } |
|||
set { m_BrightnessText = brightnessText; } |
|||
} |
|||
|
|||
[Tooltip("The UI Text element used to display the estimated color temperature in the physical environment.")] |
|||
[SerializeField] |
|||
Text m_ColorTemperatureText; |
|||
|
|||
/// <summary>
|
|||
/// The UI Text element used to display the estimated color temperature in the scene.
|
|||
/// </summary>
|
|||
public Text colorTemperatureText |
|||
{ |
|||
get { return m_ColorTemperatureText; } |
|||
set { m_ColorTemperatureText = value; } |
|||
} |
|||
|
|||
[Tooltip("The UI Text element used to display the estimated color correction value for the physical environment.")] |
|||
[SerializeField] |
|||
Text m_ColorCorrectionText; |
|||
|
|||
/// <summary>
|
|||
/// The UI Text element used to display the estimated color correction value for the scene.
|
|||
/// </summary>
|
|||
public Text colorCorrectionText |
|||
{ |
|||
get { return m_ColorCorrectionText; } |
|||
set { m_ColorCorrectionText = value; } |
|||
} |
|||
LightEstimation m_LightEstimation; |
|||
void Awake() |
|||
{ |
|||
m_LightEstimation = GetComponent<LightEstimation>(); |
|||
} |
|||
const string k_UnavailableText = "Unavailable"; |
|||
void Update() |
|||
{ |
|||
SetUIValue(m_LightEstimation.brightness, brightnessText); |
|||
SetUIValue(m_LightEstimation.colorTemperature, colorTemperatureText); |
|||
SetUIValue(m_LightEstimation.colorCorrection, colorCorrectionText); |
|||
} |
|||
void Awake() |
|||
{ |
|||
m_LightEstimation = GetComponent<LightEstimation>(); |
|||
} |
|||
void SetUIValue<T>(T? displayValue, Text text) where T : struct |
|||
{ |
|||
if (text != null) |
|||
text.text = displayValue.HasValue ? displayValue.Value.ToString(): k_UnavailableText; |
|||
} |
|||
void Update() |
|||
{ |
|||
SetUIValue(m_LightEstimation.brightness.HasValue, m_BrightnessVal, m_LightEstimation.brightness.Value.ToString()); |
|||
SetUIValue(m_LightEstimation.colorTemperature.HasValue, m_ColorTempVal, m_LightEstimation.colorTemperature.Value.ToString()); |
|||
SetUIValue(m_LightEstimation.colorCorrection.HasValue, m_ColorCorrectVal, m_LightEstimation.colorTemperature.Value.ToString()); |
|||
} |
|||
const string k_UnavailableText = "Unavailable"; |
|||
void SetUIValue(bool ContainsValue, Text UIText, string DisplayValue) |
|||
{ |
|||
if (UIText) |
|||
{ |
|||
if (ContainsValue) |
|||
{ |
|||
UIText.text = DisplayValue; |
|||
} |
|||
else |
|||
{ |
|||
UIText.text = k_UnavailableText; |
|||
} |
|||
} |
|||
} |
|||
|
|||
LightEstimation m_LightEstimation; |
|||
} |
|
|||
<linker> |
|||
<assembly fullname="Unity.XR.ARCore" ignoreIfMissing="1" preserve="all"/> |
|||
<assembly fullname="Unity.XR.ARKit" ignoreIfMissing="1" preserve="all"/> |
|||
<assembly fullname="Unity.XR.ARCore" ignoreIfMissing="1" preserve="none"/> |
|||
<assembly fullname="Unity.XR.ARKit" ignoreIfMissing="1" preserve="none"/> |
|||
<assembly fullname="Unity.XR.ARKit.FaceTracking" ignoreIfMissing="1" preserve="none"/> |
|||
</linker> |
|
|||
{ |
|||
"dependencies": { |
|||
"com.unity.collab-proxy": "1.2.9", |
|||
"com.unity.package-manager-ui": "2.0.0-preview.7", |
|||
"com.unity.render-pipelines.lightweight": "3.3.0-preview", |
|||
"com.unity.xr.arcore": "1.0.0-preview.19", |
|||
"com.unity.xr.arfoundation": "1.0.0-preview.18", |
|||
"com.unity.xr.arkit": "1.0.0-preview.14", |
|||
"com.unity.ads": "2.3.1", |
|||
"com.unity.analytics": "3.2.2", |
|||
"com.unity.collab-proxy": "1.2.15", |
|||
"com.unity.package-manager-ui": "2.0.3", |
|||
"com.unity.render-pipelines.lightweight": "4.8.0-preview", |
|||
"com.unity.purchasing": "2.0.3", |
|||
"com.unity.textmeshpro": "1.3.0", |
|||
"com.unity.xr.arcore": "1.0.0-preview.24", |
|||
"com.unity.xr.arfoundation": "1.0.0-preview.22", |
|||
"com.unity.xr.arkit": "1.0.0-preview.23", |
|||
"com.unity.modules.ai": "1.0.0", |
|||
"com.unity.modules.animation": "1.0.0", |
|||
"com.unity.modules.assetbundle": "1.0.0", |
|||
"com.unity.modules.cloth": "1.0.0", |
|||
"com.unity.modules.director": "1.0.0", |
|||
"com.unity.modules.imageconversion": "1.0.0", |
|||
"com.unity.modules.jsonserialize": "1.0.0", |
|||
"com.unity.modules.physics2d": "1.0.0", |
|||
"com.unity.modules.screencapture": "1.0.0", |
|||
"com.unity.modules.terrain": "1.0.0", |
|||
"com.unity.modules.terrainphysics": "1.0.0", |
|||
"com.unity.modules.tilemap": "1.0.0", |
|||
"com.unity.modules.uielements": "1.0.0", |
|||
"com.unity.modules.umbra": "1.0.0", |
|||
"com.unity.modules.unityanalytics": "1.0.0", |
|||
"com.unity.modules.unitywebrequest": "1.0.0", |
|||
"com.unity.modules.unitywebrequestassetbundle": "1.0.0", |
|||
"com.unity.modules.unitywebrequestaudio": "1.0.0", |
|||
"com.unity.modules.unitywebrequesttexture": "1.0.0", |
|||
"com.unity.modules.unitywebrequestwww": "1.0.0", |
|||
"com.unity.modules.vehicles": "1.0.0", |
|||
"com.unity.modules.video": "1.0.0", |
|||
"com.unity.modules.wind": "1.0.0", |
|||
"com.unity.modules.xr": "1.0.0" |
|||
} |
|||
} |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!159 &1 |
|||
EditorSettings: |
|||
m_ObjectHideFlags: 0 |
|||
serializedVersion: 7 |
|||
m_ExternalVersionControlSupport: Visible Meta Files |
|||
m_SerializationMode: 2 |
|||
m_LineEndingsForNewScripts: 2 |
|||
m_DefaultBehaviorMode: 0 |
|||
m_SpritePackerMode: 0 |
|||
m_SpritePackerPaddingPower: 1 |
|||
m_EtcTextureCompressorBehavior: 1 |
|||
m_EtcTextureFastCompressor: 1 |
|||
m_EtcTextureNormalCompressor: 2 |
|||
m_EtcTextureBestCompressor: 4 |
|||
m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd |
|||
m_ProjectGenerationRootNamespace: |
|||
m_UserGeneratedProjectSuffix: |
|||
m_CollabEditorSettings: |
|||
inProgressEnabled: 1 |
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!159 &1 |
|||
EditorSettings: |
|||
m_ObjectHideFlags: 0 |
|||
serializedVersion: 7 |
|||
m_ExternalVersionControlSupport: Visible Meta Files |
|||
m_SerializationMode: 2 |
|||
m_LineEndingsForNewScripts: 2 |
|||
m_DefaultBehaviorMode: 0 |
|||
m_PrefabRegularEnvironment: {fileID: 0} |
|||
m_PrefabUIEnvironment: {fileID: 0} |
|||
m_SpritePackerMode: 0 |
|||
m_SpritePackerPaddingPower: 1 |
|||
m_EtcTextureCompressorBehavior: 1 |
|||
m_EtcTextureFastCompressor: 1 |
|||
m_EtcTextureNormalCompressor: 2 |
|||
m_EtcTextureBestCompressor: 4 |
|||
m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef |
|||
m_ProjectGenerationRootNamespace: |
|||
m_CollabEditorSettings: |
|||
inProgressEnabled: 1 |
|||
m_EnableTextureStreamingInPlayMode: 1 |
|
|||
m_EditorVersion: 2018.3.0b2 |
|||
m_EditorVersion: 2018.3.0f2 |
|
|||
# AR Foundation Samples |
|||
Example projects that utilize *AR Foundation* and demonstrates its functionality with sample assets and components. |
|||
Example projects that use *AR Foundation* and demonstrate its functionality with sample assets and components. |
|||
Requires Unity version 2018.1+ |
|||
|
|||
Requires the AR Foundation package |
|||
Compatible with Unity 2018.3. |
|||
1. Download the latest version of Unity 2018.1 or 2018.2 |
|||
1. Download the latest version of Unity 2018.3 |
|||
3. Open your choice of sample scenes. |
|||
3. Open your choice of sample scene. |
|||
4. See the documentation for the AR Foundation for usage instructions and more information |
|||
See the [AR Foundation Documentation](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@1.0/manual/index.html) to learn how to get started with the core components. |
|||
4. See the [AR Foundation Documentation](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@1.0) for usage instructions and more information. |
|
|||
%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: 7a3c2811d41034e52a6d6c33ac73a207, type: 3} |
|||
m_Name: ARKitSettings |
|||
m_EditorClassIdentifier: |
|||
m_ARKitRequirement: 0 |
|||
m_ARKitFaceTrackingEnabled: 1 |
|
|||
fileFormatVersion: 2 |
|||
guid: 2d5fb8e61571b4e3897f221189089fd6 |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 11400000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 3c70ae3d41aa5474991871739fbc0d11 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System; |
|||
using UnityEngine.Experimental.Rendering; |
|||
using UnityEngine.Experimental.Rendering.LightweightPipeline; |
|||
using UnityEngine.Rendering; |
|||
|
|||
namespace UnityEngine.XR.ARFoundation |
|||
{ |
|||
public class LWRPBackgroundRenderPass : ScriptableRenderPass |
|||
{ |
|||
Material m_BlitMaterial; |
|||
RenderTargetIdentifier m_DepthIdentifier; |
|||
RenderTargetIdentifier m_TargetIdentifier; |
|||
RenderTextureDescriptor m_Descriptor; |
|||
const string k_ARBlitTag = "ARBackground Blit Pass"; |
|||
|
|||
/// <summary>
|
|||
/// This render pass will need to be setup with the following parameters to be able to execute when called to do so.
|
|||
/// In this case, this method is called from GetPassToEnqueue in IBeforeRender interface.
|
|||
/// </summary>
|
|||
/// <param name="mat"> Material to be used to clear the screen. </param>
|
|||
/// <param name="ident"> RenderTargetIdentifier for the color buffer. </param>
|
|||
/// <param name="depthIdent"> RenderTargetIdentifier for the depth buffer.</param>
|
|||
/// <param name="descript"> RenderTextureDescriptor for the target RenderTexture. </param>
|
|||
/// <returns> True if the material set is not null. </returns>
|
|||
public bool Setup(Material mat, RenderTargetIdentifier ident, RenderTargetIdentifier depthIdent, RenderTextureDescriptor descript) |
|||
{ |
|||
m_BlitMaterial = mat; |
|||
m_TargetIdentifier = ident; |
|||
m_DepthIdentifier = depthIdent; |
|||
m_Descriptor = descript; |
|||
return m_BlitMaterial != null; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Custom rendering for clearing the background with the pass-thru video for AR happens here. We use the parameters passed in via setup
|
|||
/// to create command buffer that clears the render target and blits to it using the clear material.
|
|||
/// </summary>
|
|||
/// <param name="renderer"> The ScriptableRenderer that is being used. </param>
|
|||
/// <param name="context"> The ScriptableRenderContext used to execute the command buffer that we create. </param>
|
|||
/// <param name="renderingData"> RenderingData (unused here). </param>
|
|||
/// <exception cref="ArgumentNullException"> Throw this exception if the renderer is null. </exception>
|
|||
public override void Execute(ScriptableRenderer renderer, ScriptableRenderContext context, ref RenderingData renderingData) |
|||
{ |
|||
if (renderer == null) |
|||
throw new ArgumentNullException("renderer"); |
|||
|
|||
var cmd = CommandBufferPool.Get(k_ARBlitTag); |
|||
|
|||
RenderBufferLoadAction colorLoadOp = RenderBufferLoadAction.DontCare; |
|||
RenderBufferStoreAction colorStoreOp = RenderBufferStoreAction.Store; |
|||
|
|||
RenderBufferLoadAction depthLoadOp = RenderBufferLoadAction.DontCare; |
|||
RenderBufferStoreAction depthStoreOp = RenderBufferStoreAction.Store; |
|||
|
|||
SetRenderTarget(cmd, m_TargetIdentifier, colorLoadOp, colorStoreOp, |
|||
m_DepthIdentifier, depthLoadOp, depthStoreOp, ClearFlag.All, Color.clear, m_Descriptor.dimension); |
|||
|
|||
cmd.Blit(null, m_TargetIdentifier, m_BlitMaterial); |
|||
context.ExecuteCommandBuffer(cmd); |
|||
CommandBufferPool.Release(cmd); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 566adfba2b318447fb941a2ea4f3f84f |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
|
|||
using System; |
|||
using UnityEngine.Rendering; |
|||
|
|||
namespace UnityEngine.XR.ARFoundation |
|||
{ |
|||
[CreateAssetMenu(fileName = "LWRPBackgroundRendererAsset", menuName = "XR/LWRPBackgroundRendererAsset")] |
|||
public class LWRPBackgroundRendererAsset : ARBackgroundRendererAsset |
|||
{ |
|||
/// <summary>
|
|||
/// we're going to reference all materials that we want to use so that they get built into the project
|
|||
/// </summary>
|
|||
[SerializeField] |
|||
Material[] m_MaterialsUsed; |
|||
|
|||
static bool useRenderPipeline { get { return GraphicsSettings.renderPipelineAsset != null; } } |
|||
|
|||
public override ARFoundationBackgroundRenderer CreateARBackgroundRenderer() |
|||
{ |
|||
return useRenderPipeline ? new LWRPBackgroundRenderer() : new ARFoundationBackgroundRenderer(); |
|||
} |
|||
|
|||
public override void CreateHelperComponents(GameObject cameraGameObject) |
|||
{ |
|||
if (useRenderPipeline) |
|||
{ |
|||
var lwrpBeforeCameraRender = cameraGameObject.GetComponent<LWRPBeforeCameraRender>(); |
|||
if (lwrpBeforeCameraRender == null) |
|||
{ |
|||
cameraGameObject.AddComponent<LWRPBeforeCameraRender>(); |
|||
} |
|||
} |
|||
} |
|||
|
|||
public override Material CreateCustomMaterial() |
|||
{ |
|||
var cameraSubsystem = ARSubsystemManager.cameraSubsystem; |
|||
if (cameraSubsystem == null) |
|||
return null; |
|||
|
|||
// Try to create a material from the plugin's provided shader.
|
|||
var shaderName = ""; |
|||
if (!cameraSubsystem.TryGetShaderName(ref shaderName)) |
|||
return null; |
|||
|
|||
shaderName = shaderName + "LWRP"; |
|||
|
|||
var shader = Shader.Find(shaderName); |
|||
if (shader == null) |
|||
{ |
|||
throw new InvalidOperationException(string.Format( |
|||
"Could not find shader named \"{0}\" required for LWRP video overlay on camera subsystem named \"{1}\".", |
|||
shaderName, |
|||
cameraSubsystem.SubsystemDescriptor.id)); |
|||
} |
|||
|
|||
return new Material(shader); |
|||
} |
|||
} |
|||
|
|||
} |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!21 &2100000 |
|||
Material: |
|||
serializedVersion: 6 |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_Name: FeaturePointMaterial |
|||
m_Shader: {fileID: 203, guid: 0000000000000000f000000000000000, type: 0} |
|||
m_ShaderKeywords: |
|||
m_LightmapFlags: 4 |
|||
m_EnableInstancingVariants: 0 |
|||
m_DoubleSidedGI: 0 |
|||
m_CustomRenderQueue: -1 |
|||
stringTagMap: {} |
|||
disabledShaderPasses: [] |
|||
m_SavedProperties: |
|||
serializedVersion: 3 |
|||
m_TexEnvs: |
|||
- _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: 2800000, guid: c8240f56f5bca4387a34716c42b57c76, type: 3} |
|||
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} |
|||
m_Floats: |
|||
- _BumpScale: 1 |
|||
- _Cutoff: 0.5 |
|||
- _DetailNormalMapScale: 1 |
|||
- _DstBlend: 0 |
|||
- _GlossMapScale: 1 |
|||
- _Glossiness: 0.5 |
|||
- _GlossyReflections: 1 |
|||
- _InvFade: 1 |
|||
- _Metallic: 0 |
|||
- _Mode: 0 |
|||
- _OcclusionStrength: 1 |
|||
- _Parallax: 0.02 |
|||
- _SmoothnessTextureChannel: 0 |
|||
- _SpecularHighlights: 1 |
|||
- _SrcBlend: 1 |
|||
- _UVSec: 0 |
|||
- _ZWrite: 1 |
|||
m_Colors: |
|||
- _Color: {r: 1, g: 1, b: 1, a: 1} |
|||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} |
|||
- _TintColor: {r: 1, g: 1, b: 1, a: 0.16862746} |
|
|||
fileFormatVersion: 2 |
|||
guid: 0eb8a0cec82ab439bbe55783f6711ae0 |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 2100000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!21 &2100000 |
|||
Material: |
|||
serializedVersion: 6 |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_Name: TriColor |
|||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} |
|||
m_ShaderKeywords: |
|||
m_LightmapFlags: 4 |
|||
m_EnableInstancingVariants: 0 |
|||
m_DoubleSidedGI: 0 |
|||
m_CustomRenderQueue: -1 |
|||
stringTagMap: {} |
|||
disabledShaderPasses: [] |
|||
m_SavedProperties: |
|||
serializedVersion: 3 |
|||
m_TexEnvs: |
|||
- _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: 2800000, guid: 621b34d995d0b424a89840c10e611e18, type: 3} |
|||
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} |
|||
m_Floats: |
|||
- _BumpScale: 1 |
|||
- _Cutoff: 0.5 |
|||
- _DetailNormalMapScale: 1 |
|||
- _DstBlend: 0 |
|||
- _GlossMapScale: 1 |
|||
- _Glossiness: 0.5 |
|||
- _GlossyReflections: 1 |
|||
- _Metallic: 0 |
|||
- _Mode: 0 |
|||
- _OcclusionStrength: 1 |
|||
- _Parallax: 0.02 |
|||
- _SmoothnessTextureChannel: 0 |
|||
- _SpecularHighlights: 1 |
|||
- _SrcBlend: 1 |
|||
- _UVSec: 0 |
|||
- _ZWrite: 1 |
|||
m_Colors: |
|||
- _Color: {r: 1, g: 1, b: 1, a: 1} |
|||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} |
|
|||
fileFormatVersion: 2 |
|||
guid: 2fcadc4d141624ca58d14d856ab23dc8 |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 2100000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!21 &2100000 |
|||
Material: |
|||
serializedVersion: 6 |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_Name: XMaterial |
|||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} |
|||
m_ShaderKeywords: |
|||
m_LightmapFlags: 4 |
|||
m_EnableInstancingVariants: 0 |
|||
m_DoubleSidedGI: 0 |
|||
m_CustomRenderQueue: -1 |
|||
stringTagMap: {} |
|||
disabledShaderPasses: [] |
|||
m_SavedProperties: |
|||
serializedVersion: 3 |
|||
m_TexEnvs: |
|||
- _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} |
|||
m_Floats: |
|||
- _BumpScale: 1 |
|||
- _Cutoff: 0.5 |
|||
- _DetailNormalMapScale: 1 |
|||
- _DstBlend: 0 |
|||
- _GlossMapScale: 1 |
|||
- _Glossiness: 0.5 |
|||
- _GlossyReflections: 1 |
|||
- _Metallic: 0 |
|||
- _Mode: 0 |
|||
- _OcclusionStrength: 1 |
|||
- _Parallax: 0.02 |
|||
- _SmoothnessTextureChannel: 0 |
|||
- _SpecularHighlights: 1 |
|||
- _SrcBlend: 1 |
|||
- _UVSec: 0 |
|||
- _ZWrite: 1 |
|||
m_Colors: |
|||
- _Color: {r: 0.9339623, g: 0.15419187, b: 0.15419187, a: 1} |
|||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} |
|
|||
fileFormatVersion: 2 |
|||
guid: 1d85e66239f5b41eb87246c413157610 |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 2100000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!21 &2100000 |
|||
Material: |
|||
serializedVersion: 6 |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_Name: YMaterial |
|||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} |
|||
m_ShaderKeywords: |
|||
m_LightmapFlags: 4 |
|||
m_EnableInstancingVariants: 0 |
|||
m_DoubleSidedGI: 0 |
|||
m_CustomRenderQueue: -1 |
|||
stringTagMap: {} |
|||
disabledShaderPasses: [] |
|||
m_SavedProperties: |
|||
serializedVersion: 3 |
|||
m_TexEnvs: |
|||
- _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} |
|||
m_Floats: |
|||
- _BumpScale: 1 |
|||
- _Cutoff: 0.5 |
|||
- _DetailNormalMapScale: 1 |
|||
- _DstBlend: 0 |
|||
- _GlossMapScale: 1 |
|||
- _Glossiness: 0.5 |
|||
- _GlossyReflections: 1 |
|||
- _Metallic: 0 |
|||
- _Mode: 0 |
|||
- _OcclusionStrength: 1 |
|||
- _Parallax: 0.02 |
|||
- _SmoothnessTextureChannel: 0 |
|||
- _SpecularHighlights: 1 |
|||
- _SrcBlend: 1 |
|||
- _UVSec: 0 |
|||
- _ZWrite: 1 |
|||
m_Colors: |
|||
- _Color: {r: 0.18856516, g: 0.9339623, b: 0.17181383, a: 1} |
|||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} |
|
|||
fileFormatVersion: 2 |
|||
guid: e62de97909a2840f786ce710f802cf2d |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 2100000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!21 &2100000 |
|||
Material: |
|||
serializedVersion: 6 |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_Name: ZMaterial 1 |
|||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} |
|||
m_ShaderKeywords: |
|||
m_LightmapFlags: 4 |
|||
m_EnableInstancingVariants: 0 |
|||
m_DoubleSidedGI: 0 |
|||
m_CustomRenderQueue: -1 |
|||
stringTagMap: {} |
|||
disabledShaderPasses: [] |
|||
m_SavedProperties: |
|||
serializedVersion: 3 |
|||
m_TexEnvs: |
|||
- _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} |
|||
m_Floats: |
|||
- _BumpScale: 1 |
|||
- _Cutoff: 0.5 |
|||
- _DetailNormalMapScale: 1 |
|||
- _DstBlend: 0 |
|||
- _GlossMapScale: 1 |
|||
- _Glossiness: 0.5 |
|||
- _GlossyReflections: 1 |
|||
- _Metallic: 0 |
|||
- _Mode: 0 |
|||
- _OcclusionStrength: 1 |
|||
- _Parallax: 0.02 |
|||
- _SmoothnessTextureChannel: 0 |
|||
- _SpecularHighlights: 1 |
|||
- _SrcBlend: 1 |
|||
- _UVSec: 0 |
|||
- _ZWrite: 1 |
|||
m_Colors: |
|||
- _Color: {r: 0.10196078, g: 0.9281988, b: 0.9529412, a: 1} |
|||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} |
|
|||
fileFormatVersion: 2 |
|||
guid: 4260d5b4b48824e04b5464194b713343 |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 2100000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!21 &2100000 |
|||
Material: |
|||
serializedVersion: 6 |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_Name: ZMaterial |
|||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} |
|||
m_ShaderKeywords: |
|||
m_LightmapFlags: 4 |
|||
m_EnableInstancingVariants: 0 |
|||
m_DoubleSidedGI: 0 |
|||
m_CustomRenderQueue: -1 |
|||
stringTagMap: {} |
|||
disabledShaderPasses: [] |
|||
m_SavedProperties: |
|||
serializedVersion: 3 |
|||
m_TexEnvs: |
|||
- _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} |
|||
m_Floats: |
|||
- _BumpScale: 1 |
|||
- _Cutoff: 0.5 |
|||
- _DetailNormalMapScale: 1 |
|||
- _DstBlend: 0 |
|||
- _GlossMapScale: 1 |
|||
- _Glossiness: 0.5 |
|||
- _GlossyReflections: 1 |
|||
- _Metallic: 0 |
|||
- _Mode: 0 |
|||
- _OcclusionStrength: 1 |
|||
- _Parallax: 0.02 |
|||
- _SmoothnessTextureChannel: 0 |
|||
- _SpecularHighlights: 1 |
|||
- _SrcBlend: 1 |
|||
- _UVSec: 0 |
|||
- _ZWrite: 1 |
|||
m_Colors: |
|||
- _Color: {r: 0.1033731, g: 0.15186034, b: 0.9528302, a: 1} |
|||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} |
|
|||
fileFormatVersion: 2 |
|||
guid: d80c1a202911a4a37a3da59992876dfc |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 2100000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!21 &2100000 |
|||
Material: |
|||
serializedVersion: 6 |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_Name: sloth_all_1001_AlbedoTransparency |
|||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} |
|||
m_ShaderKeywords: _METALLICGLOSSMAP _NORMALMAP |
|||
m_LightmapFlags: 4 |
|||
m_EnableInstancingVariants: 0 |
|||
m_DoubleSidedGI: 0 |
|||
m_CustomRenderQueue: -1 |
|||
stringTagMap: {} |
|||
disabledShaderPasses: [] |
|||
m_SavedProperties: |
|||
serializedVersion: 3 |
|||
m_TexEnvs: |
|||
- _BumpMap: |
|||
m_Texture: {fileID: 2800000, guid: 27a1657365e7440158436bc8e151d931, type: 3} |
|||
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: 2800000, guid: b0a9b07b207264316bf3be95cdcf6a08, type: 3} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _MetallicGlossMap: |
|||
m_Texture: {fileID: 2800000, guid: 433a9cacc6e034c25a6a14eb6af1b09c, type: 3} |
|||
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} |
|||
m_Floats: |
|||
- _BumpScale: 1 |
|||
- _Cutoff: 0.5 |
|||
- _DetailNormalMapScale: 1 |
|||
- _DstBlend: 0 |
|||
- _GlossMapScale: 1 |
|||
- _Glossiness: 0.5 |
|||
- _GlossyReflections: 1 |
|||
- _Metallic: 0 |
|||
- _Mode: 0 |
|||
- _OcclusionStrength: 1 |
|||
- _Parallax: 0.02 |
|||
- _SmoothnessTextureChannel: 0 |
|||
- _SpecularHighlights: 1 |
|||
- _SrcBlend: 1 |
|||
- _UVSec: 0 |
|||
- _ZWrite: 1 |
|||
m_Colors: |
|||
- _Color: {r: 1, g: 1, b: 1, a: 1} |
|||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} |
|
|||
fileFormatVersion: 2 |
|||
guid: 0eafc0c8e166e4cd2b0f64b71fda0c45 |
|||
timeCreated: 1511933011 |
|||
licenseType: Pro |
|||
NativeFormatImporter: |
|||
mainObjectFileID: 2100000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 7ae3334d5291f440ca4d8c1f4a3e7d21 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!1001 &100100000 |
|||
Prefab: |
|||
m_ObjectHideFlags: 1 |
|||
serializedVersion: 2 |
|||
m_Modification: |
|||
m_TransformParent: {fileID: 0} |
|||
m_Modifications: [] |
|||
m_RemovedComponents: [] |
|||
m_SourcePrefab: {fileID: 0} |
|||
m_RootGameObject: {fileID: 1585201990951412} |
|||
m_IsPrefabAsset: 1 |
|||
--- !u!1 &1585201990951412 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 4266372707468888} |
|||
- component: {fileID: 64925081986755876} |
|||
- component: {fileID: 33790042174619686} |
|||
- component: {fileID: 23747677035716922} |
|||
- component: {fileID: 114973852414686920} |
|||
- component: {fileID: 114999847245811208} |
|||
- component: {fileID: 114750936167521158} |
|||
- component: {fileID: 114949855546553426} |
|||
- component: {fileID: 95141720034615666} |
|||
m_Layer: 0 |
|||
m_Name: AR Feathered Plane Fade |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!4 &4266372707468888 |
|||
Transform: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1585201990951412} |
|||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
|||
m_LocalPosition: {x: 0, y: 0, z: 0.266} |
|||
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!23 &23747677035716922 |
|||
MeshRenderer: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1585201990951412} |
|||
m_Enabled: 1 |
|||
m_CastShadows: 1 |
|||
m_ReceiveShadows: 1 |
|||
m_DynamicOccludee: 1 |
|||
m_MotionVectors: 1 |
|||
m_LightProbeUsage: 1 |
|||
m_ReflectionProbeUsage: 1 |
|||
m_RenderingLayerMask: 4294967295 |
|||
m_Materials: |
|||
- {fileID: 2100000, guid: 23e2748d52724824fb92be95f957d7dc, type: 2} |
|||
m_StaticBatchInfo: |
|||
firstSubMesh: 0 |
|||
subMeshCount: 0 |
|||
m_StaticBatchRoot: {fileID: 0} |
|||
m_ProbeAnchor: {fileID: 0} |
|||
m_LightProbeVolumeOverride: {fileID: 0} |
|||
m_ScaleInLightmap: 1 |
|||
m_PreserveUVs: 0 |
|||
m_IgnoreNormalsForChartDetection: 0 |
|||
m_ImportantGI: 0 |
|||
m_StitchLightmapSeams: 0 |
|||
m_SelectedEditorRenderState: 3 |
|||
m_MinimumChartSize: 4 |
|||
m_AutoUVMaxDistance: 0.5 |
|||
m_AutoUVMaxAngle: 89 |
|||
m_LightmapParameters: {fileID: 0} |
|||
m_SortingLayerID: 0 |
|||
m_SortingLayer: 0 |
|||
m_SortingOrder: 0 |
|||
--- !u!33 &33790042174619686 |
|||
MeshFilter: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1585201990951412} |
|||
m_Mesh: {fileID: 0} |
|||
--- !u!64 &64925081986755876 |
|||
MeshCollider: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1585201990951412} |
|||
m_Material: {fileID: 0} |
|||
m_IsTrigger: 0 |
|||
m_Enabled: 1 |
|||
serializedVersion: 3 |
|||
m_Convex: 0 |
|||
m_CookingOptions: 14 |
|||
m_SkinWidth: 0.01 |
|||
m_Mesh: {fileID: 0} |
|||
--- !u!95 &95141720034615666 |
|||
Animator: |
|||
serializedVersion: 3 |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1585201990951412} |
|||
m_Enabled: 1 |
|||
m_Avatar: {fileID: 0} |
|||
m_Controller: {fileID: 9100000, guid: 3f2672ab90096497b9d94da7ea0c6683, type: 2} |
|||
m_CullingMode: 0 |
|||
m_UpdateMode: 0 |
|||
m_ApplyRootMotion: 0 |
|||
m_LinearVelocityBlending: 0 |
|||
m_WarningMessage: |
|||
m_HasTransformHierarchy: 1 |
|||
m_AllowConstantClipSamplingOptimization: 1 |
|||
m_KeepAnimatorControllerStateOnDisable: 0 |
|||
--- !u!114 &114750936167521158 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1585201990951412} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 3fe544a55a03bab479ce73b5bf64215e, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_FeatheringWidth: 0.2 |
|||
--- !u!114 &114949855546553426 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1585201990951412} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 88dbe81e1cd074727b11130714ca8d83, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
--- !u!114 &114973852414686920 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1585201990951412} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 5f66da7470dce8f4d821d71dd2b1d4ac, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_DestroyOnRemoval: 1 |
|||
m_VertexChangedThreshold: 0.01 |
|||
--- !u!114 &114999847245811208 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1585201990951412} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 3d180956a54db4646a1c6342921672ad, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|
|||
fileFormatVersion: 2 |
|||
guid: 617b10198100d44078c5e70d97423117 |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 0 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!1001 &100100000 |
|||
Prefab: |
|||
m_ObjectHideFlags: 1 |
|||
serializedVersion: 2 |
|||
m_Modification: |
|||
m_TransformParent: {fileID: 0} |
|||
m_Modifications: [] |
|||
m_RemovedComponents: [] |
|||
m_SourcePrefab: {fileID: 0} |
|||
m_RootGameObject: {fileID: 1237402283603786} |
|||
m_IsPrefabAsset: 1 |
|||
--- !u!1 &1237402283603786 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 4736338840663188} |
|||
m_Layer: 0 |
|||
m_Name: AR Placed Sphere |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!1 &1542318734598152 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 4398563517545320} |
|||
- component: {fileID: 33905199867203260} |
|||
- component: {fileID: 23282453735777266} |
|||
m_Layer: 0 |
|||
m_Name: Sphere |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!4 &4398563517545320 |
|||
Transform: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1542318734598152} |
|||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
|||
m_LocalPosition: {x: 0, y: 0.05, z: 0} |
|||
m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} |
|||
m_Children: [] |
|||
m_Father: {fileID: 4736338840663188} |
|||
m_RootOrder: 0 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
--- !u!4 &4736338840663188 |
|||
Transform: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1237402283603786} |
|||
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: 4398563517545320} |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 0 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
--- !u!23 &23282453735777266 |
|||
MeshRenderer: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1542318734598152} |
|||
m_Enabled: 1 |
|||
m_CastShadows: 1 |
|||
m_ReceiveShadows: 1 |
|||
m_DynamicOccludee: 1 |
|||
m_MotionVectors: 1 |
|||
m_LightProbeUsage: 1 |
|||
m_ReflectionProbeUsage: 1 |
|||
m_RenderingLayerMask: 4294967295 |
|||
m_Materials: |
|||
- {fileID: 2100000, guid: 9b5d75722d424804fa0c0efaa228c3db, type: 2} |
|||
m_StaticBatchInfo: |
|||
firstSubMesh: 0 |
|||
subMeshCount: 0 |
|||
m_StaticBatchRoot: {fileID: 0} |
|||
m_ProbeAnchor: {fileID: 0} |
|||
m_LightProbeVolumeOverride: {fileID: 0} |
|||
m_ScaleInLightmap: 1 |
|||
m_PreserveUVs: 0 |
|||
m_IgnoreNormalsForChartDetection: 0 |
|||
m_ImportantGI: 0 |
|||
m_StitchLightmapSeams: 0 |
|||
m_SelectedEditorRenderState: 3 |
|||
m_MinimumChartSize: 4 |
|||
m_AutoUVMaxDistance: 0.5 |
|||
m_AutoUVMaxAngle: 89 |
|||
m_LightmapParameters: {fileID: 0} |
|||
m_SortingLayerID: 0 |
|||
m_SortingLayer: 0 |
|||
m_SortingOrder: 0 |
|||
--- !u!33 &33905199867203260 |
|||
MeshFilter: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1542318734598152} |
|||
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} |
|
|||
fileFormatVersion: 2 |
|||
guid: 2e80f2e009b5347149ebaae6d96ddfb8 |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 100100000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
Assets/Prefabs/AR Point Cloud Visualizer.prefab
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: 7f988301d22a4406da0408106c75d212 |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 100100000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!1 &1217920764520308 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 4447038815701200} |
|||
- component: {fileID: 95365403429265904} |
|||
- component: {fileID: 114957203121655242} |
|||
- component: {fileID: 3258786451724037531} |
|||
m_Layer: 0 |
|||
m_Name: FaceBlendShapes |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!4 &4447038815701200 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1217920764520308} |
|||
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: 4090201786607310} |
|||
- {fileID: 4272230514208426} |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 0 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
--- !u!95 &95365403429265904 |
|||
Animator: |
|||
serializedVersion: 3 |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1217920764520308} |
|||
m_Enabled: 1 |
|||
m_Avatar: {fileID: 9000000, guid: 63ae12abc50414d5c882dbe18f6a820b, type: 3} |
|||
m_Controller: {fileID: 0} |
|||
m_CullingMode: 1 |
|||
m_UpdateMode: 0 |
|||
m_ApplyRootMotion: 0 |
|||
m_LinearVelocityBlending: 0 |
|||
m_WarningMessage: |
|||
m_HasTransformHierarchy: 1 |
|||
m_AllowConstantClipSamplingOptimization: 1 |
|||
m_KeepAnimatorControllerStateOnDisable: 0 |
|||
--- !u!114 &114957203121655242 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1217920764520308} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 5d87bd45cfc214ce48ce8b882225dd11, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_DestroyOnRemoval: 1 |
|||
--- !u!114 &3258786451724037531 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1217920764520308} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 77136493c3caf4805ac5a602f75072e0, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_CoefficientScale: 100 |
|||
m_SkinnedMeshRenderer: {fileID: 137740007780104604} |
|||
--- !u!1 &1342913298729328 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 4272230514208426} |
|||
- component: {fileID: 137740007780104604} |
|||
m_Layer: 0 |
|||
m_Name: Sloth_Head2 |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!4 &4272230514208426 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1342913298729328} |
|||
m_LocalRotation: {x: 0, y: 1, z: 0, w: 0} |
|||
m_LocalPosition: {x: -0.000000017881392, y: 0.010724431, z: 0.0066379486} |
|||
m_LocalScale: {x: 1, y: 1, z: 1} |
|||
m_Children: [] |
|||
m_Father: {fileID: 4447038815701200} |
|||
m_RootOrder: 1 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0} |
|||
--- !u!137 &137740007780104604 |
|||
SkinnedMeshRenderer: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1342913298729328} |
|||
m_Enabled: 1 |
|||
m_CastShadows: 1 |
|||
m_ReceiveShadows: 1 |
|||
m_DynamicOccludee: 1 |
|||
m_MotionVectors: 1 |
|||
m_LightProbeUsage: 1 |
|||
m_ReflectionProbeUsage: 1 |
|||
m_RenderingLayerMask: 4294967295 |
|||
m_RendererPriority: 0 |
|||
m_Materials: |
|||
- {fileID: 2100000, guid: 0eafc0c8e166e4cd2b0f64b71fda0c45, type: 2} |
|||
m_StaticBatchInfo: |
|||
firstSubMesh: 0 |
|||
subMeshCount: 0 |
|||
m_StaticBatchRoot: {fileID: 0} |
|||
m_ProbeAnchor: {fileID: 0} |
|||
m_LightProbeVolumeOverride: {fileID: 0} |
|||
m_ScaleInLightmap: 1 |
|||
m_PreserveUVs: 0 |
|||
m_IgnoreNormalsForChartDetection: 0 |
|||
m_ImportantGI: 0 |
|||
m_StitchLightmapSeams: 0 |
|||
m_SelectedEditorRenderState: 3 |
|||
m_MinimumChartSize: 4 |
|||
m_AutoUVMaxDistance: 0.5 |
|||
m_AutoUVMaxAngle: 89 |
|||
m_LightmapParameters: {fileID: 0} |
|||
m_SortingLayerID: 0 |
|||
m_SortingLayer: 0 |
|||
m_SortingOrder: 0 |
|||
serializedVersion: 2 |
|||
m_Quality: 0 |
|||
m_UpdateWhenOffscreen: 1 |
|||
m_SkinnedMotionVectors: 1 |
|||
m_Mesh: {fileID: 4300000, guid: 63ae12abc50414d5c882dbe18f6a820b, type: 3} |
|||
m_Bones: [] |
|||
m_BlendShapeWeights: |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
- 0 |
|||
m_RootBone: {fileID: 0} |
|||
m_AABB: |
|||
m_Center: {x: 0, y: -0.015557218, z: 0} |
|||
m_Extent: {x: 0.113363, y: 0.13194084, z: 0.13394047} |
|||
m_DirtyAABB: 0 |
|||
--- !u!1 &1775342627339584 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 4090201786607310} |
|||
m_Layer: 0 |
|||
m_Name: blendshapes3 |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!4 &4090201786607310 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1775342627339584} |
|||
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: 4447038815701200} |
|||
m_RootOrder: 0 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|
|||
fileFormatVersion: 2 |
|||
guid: a5e76df5cbfd54a06abdaf52046adbc0 |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 100100000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!1001 &100100000 |
|||
Prefab: |
|||
m_ObjectHideFlags: 1 |
|||
serializedVersion: 2 |
|||
m_Modification: |
|||
m_TransformParent: {fileID: 0} |
|||
m_Modifications: [] |
|||
m_RemovedComponents: [] |
|||
m_SourcePrefab: {fileID: 0} |
|||
m_RootGameObject: {fileID: 1405894938185170} |
|||
m_IsPrefabAsset: 1 |
|||
--- !u!1 &1405894938185170 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 4223246581939772} |
|||
- component: {fileID: 114636849166517838} |
|||
- component: {fileID: 114614920402834964} |
|||
- component: {fileID: 33337409576573420} |
|||
- component: {fileID: 23210496587587374} |
|||
m_Layer: 0 |
|||
m_Name: FaceMeshPrefab |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!4 &4223246581939772 |
|||
Transform: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1405894938185170} |
|||
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!23 &23210496587587374 |
|||
MeshRenderer: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1405894938185170} |
|||
m_Enabled: 1 |
|||
m_CastShadows: 0 |
|||
m_ReceiveShadows: 0 |
|||
m_DynamicOccludee: 0 |
|||
m_MotionVectors: 1 |
|||
m_LightProbeUsage: 1 |
|||
m_ReflectionProbeUsage: 1 |
|||
m_RenderingLayerMask: 4294967295 |
|||
m_Materials: |
|||
- {fileID: 2100000, guid: 2fcadc4d141624ca58d14d856ab23dc8, type: 2} |
|||
m_StaticBatchInfo: |
|||
firstSubMesh: 0 |
|||
subMeshCount: 0 |
|||
m_StaticBatchRoot: {fileID: 0} |
|||
m_ProbeAnchor: {fileID: 0} |
|||
m_LightProbeVolumeOverride: {fileID: 0} |
|||
m_ScaleInLightmap: 1 |
|||
m_PreserveUVs: 0 |
|||
m_IgnoreNormalsForChartDetection: 0 |
|||
m_ImportantGI: 0 |
|||
m_StitchLightmapSeams: 0 |
|||
m_SelectedEditorRenderState: 3 |
|||
m_MinimumChartSize: 4 |
|||
m_AutoUVMaxDistance: 0.5 |
|||
m_AutoUVMaxAngle: 89 |
|||
m_LightmapParameters: {fileID: 0} |
|||
m_SortingLayerID: 0 |
|||
m_SortingLayer: 0 |
|||
m_SortingOrder: 0 |
|||
--- !u!33 &33337409576573420 |
|||
MeshFilter: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1405894938185170} |
|||
m_Mesh: {fileID: 0} |
|||
--- !u!114 &114614920402834964 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1405894938185170} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: f4aab259b5c35443f9b1d0c15e2ad434, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
--- !u!114 &114636849166517838 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1405894938185170} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 5d87bd45cfc214ce48ce8b882225dd11, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_DestroyOnRemoval: 1 |
|
|||
fileFormatVersion: 2 |
|||
guid: 92e70fac81673432784c18cf08f10366 |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 100100000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!1001 &100100000 |
|||
Prefab: |
|||
m_ObjectHideFlags: 1 |
|||
serializedVersion: 2 |
|||
m_Modification: |
|||
m_TransformParent: {fileID: 0} |
|||
m_Modifications: [] |
|||
m_RemovedComponents: [] |
|||
m_SourcePrefab: {fileID: 0} |
|||
m_RootGameObject: {fileID: 1362899771367802} |
|||
m_IsPrefabAsset: 1 |
|||
--- !u!1 &1362899771367802 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 4940852310305428} |
|||
- component: {fileID: 114113636911863978} |
|||
m_Layer: 0 |
|||
m_Name: FacePrefab |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!1 &1544274209718308 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 4209237128822544} |
|||
- component: {fileID: 33224036693064280} |
|||
- component: {fileID: 23670081559731906} |
|||
- component: {fileID: 65286711975546532} |
|||
m_Layer: 0 |
|||
m_Name: YAxis |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!1 &1636217163257414 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 4011343239704628} |
|||
- component: {fileID: 33886554858103006} |
|||
- component: {fileID: 23292878307893794} |
|||
- component: {fileID: 65372193988663858} |
|||
m_Layer: 0 |
|||
m_Name: ZAxis |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!1 &1777781554239030 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 4793068442743758} |
|||
- component: {fileID: 33728291956804754} |
|||
- component: {fileID: 23056951466853612} |
|||
- component: {fileID: 65730419922972700} |
|||
m_Layer: 0 |
|||
m_Name: XAxis |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!4 &4011343239704628 |
|||
Transform: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1636217163257414} |
|||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} |
|||
m_LocalPosition: {x: 0, y: 0, z: 0.05} |
|||
m_LocalScale: {x: 0.01, y: 0.01, z: 0.1} |
|||
m_Children: [] |
|||
m_Father: {fileID: 4940852310305428} |
|||
m_RootOrder: 0 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
--- !u!4 &4209237128822544 |
|||
Transform: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1544274209718308} |
|||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} |
|||
m_LocalPosition: {x: 0, y: 0.05, z: 0} |
|||
m_LocalScale: {x: 0.01, y: 0.1, z: 0.01} |
|||
m_Children: [] |
|||
m_Father: {fileID: 4940852310305428} |
|||
m_RootOrder: 1 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
--- !u!4 &4793068442743758 |
|||
Transform: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1777781554239030} |
|||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} |
|||
m_LocalPosition: {x: 0.05, y: 0, z: 0} |
|||
m_LocalScale: {x: 0.1, y: 0.01, z: 0.01} |
|||
m_Children: [] |
|||
m_Father: {fileID: 4940852310305428} |
|||
m_RootOrder: 2 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
--- !u!4 &4940852310305428 |
|||
Transform: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1362899771367802} |
|||
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: 4011343239704628} |
|||
- {fileID: 4209237128822544} |
|||
- {fileID: 4793068442743758} |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 0 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
--- !u!23 &23056951466853612 |
|||
MeshRenderer: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1777781554239030} |
|||
m_Enabled: 1 |
|||
m_CastShadows: 1 |
|||
m_ReceiveShadows: 1 |
|||
m_DynamicOccludee: 1 |
|||
m_MotionVectors: 1 |
|||
m_LightProbeUsage: 1 |
|||
m_ReflectionProbeUsage: 1 |
|||
m_RenderingLayerMask: 4294967295 |
|||
m_Materials: |
|||
- {fileID: 2100000, guid: 1d85e66239f5b41eb87246c413157610, type: 2} |
|||
m_StaticBatchInfo: |
|||
firstSubMesh: 0 |
|||
subMeshCount: 0 |
|||
m_StaticBatchRoot: {fileID: 0} |
|||
m_ProbeAnchor: {fileID: 0} |
|||
m_LightProbeVolumeOverride: {fileID: 0} |
|||
m_ScaleInLightmap: 1 |
|||
m_PreserveUVs: 0 |
|||
m_IgnoreNormalsForChartDetection: 0 |
|||
m_ImportantGI: 0 |
|||
m_StitchLightmapSeams: 0 |
|||
m_SelectedEditorRenderState: 3 |
|||
m_MinimumChartSize: 4 |
|||
m_AutoUVMaxDistance: 0.5 |
|||
m_AutoUVMaxAngle: 89 |
|||
m_LightmapParameters: {fileID: 0} |
|||
m_SortingLayerID: 0 |
|||
m_SortingLayer: 0 |
|||
m_SortingOrder: 0 |
|||
--- !u!23 &23292878307893794 |
|||
MeshRenderer: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1636217163257414} |
|||
m_Enabled: 1 |
|||
m_CastShadows: 1 |
|||
m_ReceiveShadows: 1 |
|||
m_DynamicOccludee: 1 |
|||
m_MotionVectors: 1 |
|||
m_LightProbeUsage: 1 |
|||
m_ReflectionProbeUsage: 1 |
|||
m_RenderingLayerMask: 4294967295 |
|||
m_Materials: |
|||
- {fileID: 2100000, guid: d80c1a202911a4a37a3da59992876dfc, type: 2} |
|||
m_StaticBatchInfo: |
|||
firstSubMesh: 0 |
|||
subMeshCount: 0 |
|||
m_StaticBatchRoot: {fileID: 0} |
|||
m_ProbeAnchor: {fileID: 0} |
|||
m_LightProbeVolumeOverride: {fileID: 0} |
|||
m_ScaleInLightmap: 1 |
|||
m_PreserveUVs: 0 |
|||
m_IgnoreNormalsForChartDetection: 0 |
|||
m_ImportantGI: 0 |
|||
m_StitchLightmapSeams: 0 |
|||
m_SelectedEditorRenderState: 3 |
|||
m_MinimumChartSize: 4 |
|||
m_AutoUVMaxDistance: 0.5 |
|||
m_AutoUVMaxAngle: 89 |
|||
m_LightmapParameters: {fileID: 0} |
|||
m_SortingLayerID: 0 |
|||
m_SortingLayer: 0 |
|||
m_SortingOrder: 0 |
|||
--- !u!23 &23670081559731906 |
|||
MeshRenderer: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1544274209718308} |
|||
m_Enabled: 1 |
|||
m_CastShadows: 1 |
|||
m_ReceiveShadows: 1 |
|||
m_DynamicOccludee: 1 |
|||
m_MotionVectors: 1 |
|||
m_LightProbeUsage: 1 |
|||
m_ReflectionProbeUsage: 1 |
|||
m_RenderingLayerMask: 4294967295 |
|||
m_Materials: |
|||
- {fileID: 2100000, guid: e62de97909a2840f786ce710f802cf2d, type: 2} |
|||
m_StaticBatchInfo: |
|||
firstSubMesh: 0 |
|||
subMeshCount: 0 |
|||
m_StaticBatchRoot: {fileID: 0} |
|||
m_ProbeAnchor: {fileID: 0} |
|||
m_LightProbeVolumeOverride: {fileID: 0} |
|||
m_ScaleInLightmap: 1 |
|||
m_PreserveUVs: 0 |
|||
m_IgnoreNormalsForChartDetection: 0 |
|||
m_ImportantGI: 0 |
|||
m_StitchLightmapSeams: 0 |
|||
m_SelectedEditorRenderState: 3 |
|||
m_MinimumChartSize: 4 |
|||
m_AutoUVMaxDistance: 0.5 |
|||
m_AutoUVMaxAngle: 89 |
|||
m_LightmapParameters: {fileID: 0} |
|||
m_SortingLayerID: 0 |
|||
m_SortingLayer: 0 |
|||
m_SortingOrder: 0 |
|||
--- !u!33 &33224036693064280 |
|||
MeshFilter: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1544274209718308} |
|||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} |
|||
--- !u!33 &33728291956804754 |
|||
MeshFilter: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1777781554239030} |
|||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} |
|||
--- !u!33 &33886554858103006 |
|||
MeshFilter: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1636217163257414} |
|||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} |
|||
--- !u!65 &65286711975546532 |
|||
BoxCollider: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1544274209718308} |
|||
m_Material: {fileID: 0} |
|||
m_IsTrigger: 0 |
|||
m_Enabled: 1 |
|||
serializedVersion: 2 |
|||
m_Size: {x: 1, y: 1, z: 1} |
|||
m_Center: {x: 0, y: 0, z: 0} |
|||
--- !u!65 &65372193988663858 |
|||
BoxCollider: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1636217163257414} |
|||
m_Material: {fileID: 0} |
|||
m_IsTrigger: 0 |
|||
m_Enabled: 1 |
|||
serializedVersion: 2 |
|||
m_Size: {x: 1, y: 1, z: 1} |
|||
m_Center: {x: 0, y: 0, z: 0} |
|||
--- !u!65 &65730419922972700 |
|||
BoxCollider: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1777781554239030} |
|||
m_Material: {fileID: 0} |
|||
m_IsTrigger: 0 |
|||
m_Enabled: 1 |
|||
serializedVersion: 2 |
|||
m_Size: {x: 1, y: 1, z: 1} |
|||
m_Center: {x: 0, y: 0, z: 0} |
|||
--- !u!114 &114113636911863978 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1362899771367802} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 5d87bd45cfc214ce48ce8b882225dd11, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_DestroyOnRemoval: 1 |
|
|||
fileFormatVersion: 2 |
|||
guid: 48e43bbe3af404986bbdc5a552e5fefd |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 100100000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
Assets/Scenes/ARWorldMap.unity
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: 8d8902fd0b55449dcbf3572b49d6b1b1 |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
Assets/Scenes/CameraImage.unity
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: e769916924fd3814ab1d9474de816b22 |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 8c1909290913d4c389b1517a0146bfca |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 9ad7f735814d16b46b4101510b8ef559 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 9a6de9d65f4d64509a5280cbe3d2d3af |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using UnityEngine.Experimental.XR; |
|||
using UnityEngine.XR.ARFoundation; |
|||
#if UNITY_IOS
|
|||
using UnityEngine.XR.ARKit; |
|||
#endif
|
|||
|
|||
/// <summary>
|
|||
/// Populates the action unit coefficients for an <see cref="ARFace"/>.
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// If this <c>GameObject</c> has a <c>SkinnedMeshRenderer</c>,
|
|||
/// this component will generate the blend shape coefficients from the underlying <c>ARFace</c>.
|
|||
///
|
|||
/// </remarks>
|
|||
[RequireComponent(typeof(ARFace))] |
|||
public class ARFaceArkitBlendShapeVisualizer : MonoBehaviour |
|||
{ |
|||
[SerializeField] |
|||
float m_CoefficientScale = 100.0f; |
|||
|
|||
public float coefficientScale |
|||
{ |
|||
get { return m_CoefficientScale; } |
|||
set { m_CoefficientScale = value; } |
|||
} |
|||
|
|||
[SerializeField] |
|||
SkinnedMeshRenderer m_SkinnedMeshRenderer; |
|||
|
|||
public SkinnedMeshRenderer skinnedMeshRenderer |
|||
{ |
|||
get |
|||
{ |
|||
return m_SkinnedMeshRenderer; |
|||
} |
|||
set |
|||
{ |
|||
m_SkinnedMeshRenderer = value; |
|||
CreateFeatureBlendMapping(); |
|||
} |
|||
} |
|||
|
|||
#if UNITY_IOS
|
|||
static List<XRFaceArkitBlendShapeCoefficient> s_FaceArkitBlendShapeCoefficients; |
|||
|
|||
ARKitFaceSubsystem m_ArkitFaceSubsystem; |
|||
|
|||
Dictionary<XRArkitBlendShapeLocation, int> m_FaceArkitBlendShapeIndexMap; |
|||
#endif
|
|||
|
|||
ARFace m_Face; |
|||
|
|||
void Awake() |
|||
{ |
|||
#if UNITY_IOS
|
|||
s_FaceArkitBlendShapeCoefficients = new List<XRFaceArkitBlendShapeCoefficient>(); |
|||
#endif
|
|||
m_Face = GetComponent<ARFace>(); |
|||
CreateFeatureBlendMapping(); |
|||
} |
|||
|
|||
void CreateFeatureBlendMapping() |
|||
{ |
|||
if (skinnedMeshRenderer == null || skinnedMeshRenderer.sharedMesh == null) |
|||
{ |
|||
return; |
|||
} |
|||
|
|||
#if UNITY_IOS
|
|||
const string strPrefix = "blendShape2."; |
|||
m_FaceArkitBlendShapeIndexMap = new Dictionary<XRArkitBlendShapeLocation, int>(); |
|||
|
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.BrowDownLeft ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "browDown_L"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.BrowDownRight ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "browDown_R"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.BrowInnerUp ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "browInnerUp"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.BrowOuterUpLeft ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "browOuterUp_L"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.BrowOuterUpRight ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "browOuterUp_R"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.CheekPuff ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "cheekPuff"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.CheekSquintLeft ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "cheekSquint_L"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.CheekSquintRight ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "cheekSquint_R"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.EyeBlinkLeft ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "eyeBlink_L"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.EyeBlinkRight ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "eyeBlink_R"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.EyeLookDownLeft ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "eyeLookDown_L"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.EyeLookDownRight ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "eyeLookDown_R"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.EyeLookInLeft ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "eyeLookIn_L"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.EyeLookInRight ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "eyeLookIn_R"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.EyeLookOutLeft ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "eyeLookOut_L"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.EyeLookOutRight ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "eyeLookOut_R"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.EyeLookUpLeft ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "eyeLookUp_L"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.EyeLookUpRight ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "eyeLookUp_R"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.EyeSquintLeft ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "eyeSquint_L"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.EyeSquintRight ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "eyeSquint_R"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.EyeWideLeft ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "eyeWide_L"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.EyeWideRight ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "eyeWide_R"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.JawForward ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "jawForward"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.JawLeft ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "jawLeft"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.JawOpen ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "jawOpen"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.JawRight ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "jawRight"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.MouthClose ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "mouthClose"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.MouthDimpleLeft ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "mouthDimple_L"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.MouthDimpleRight ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "mouthDimple_R"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.MouthFrownLeft ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "mouthFrown_L"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.MouthFrownRight ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "mouthFrown_R"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.MouthFunnel ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "mouthFunnel"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.MouthLeft ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "mouthLeft"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.MouthLowerDownLeft ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "mouthLowerDown_L"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.MouthLowerDownRight ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "mouthLowerDown_R"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.MouthPressLeft ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "mouthPress_L"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.MouthPressRight ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "mouthPress_R"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.MouthPucker ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "mouthPucker"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.MouthRight ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "mouthRight"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.MouthRollLower ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "mouthRollLower"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.MouthRollUpper ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "mouthRollUpper"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.MouthShrugLower ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "mouthShrugLower"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.MouthShrugUpper ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "mouthShrugUpper"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.MouthSmileLeft ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "mouthSmile_L"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.MouthSmileRight ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "mouthSmile_R"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.MouthStretchLeft ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "mouthStretch_L"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.MouthStretchRight ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "mouthStretch_R"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.MouthUpperUpLeft ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "mouthUpperUp_L"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.MouthUpperUpRight ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "mouthUpperUp_R"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.NoseSneerLeft ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "noseSneer_L"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.NoseSneerRight ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "noseSneer_R"); |
|||
m_FaceArkitBlendShapeIndexMap[XRArkitBlendShapeLocation.TongueOut ] = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex(strPrefix + "tongueOut"); |
|||
#endif
|
|||
} |
|||
|
|||
void SetVisible(bool visible) |
|||
{ |
|||
if (skinnedMeshRenderer == null) return; |
|||
|
|||
skinnedMeshRenderer.enabled = visible; |
|||
} |
|||
|
|||
void UpdateVisibility() |
|||
{ |
|||
var visible = enabled && |
|||
(m_Face.trackingState != TrackingState.Unavailable) && |
|||
(ARSubsystemManager.systemState > ARSystemState.Ready); |
|||
|
|||
SetVisible(visible); |
|||
} |
|||
|
|||
void OnEnable() |
|||
{ |
|||
#if UNITY_IOS
|
|||
m_ArkitFaceSubsystem = (ARKitFaceSubsystem) ARSubsystemManager.faceSubsystem; |
|||
if (m_ArkitFaceSubsystem == null) |
|||
return; |
|||
|
|||
m_Face.updated += OnUpdated; |
|||
ARSubsystemManager.systemStateChanged += OnSystemStateChanged; |
|||
UpdateVisibility(); |
|||
#endif
|
|||
} |
|||
|
|||
void OnDisable() |
|||
{ |
|||
m_Face.updated -= OnUpdated; |
|||
ARSubsystemManager.systemStateChanged -= OnSystemStateChanged; |
|||
} |
|||
|
|||
void OnSystemStateChanged(ARSystemStateChangedEventArgs eventArgs) |
|||
{ |
|||
UpdateVisibility(); |
|||
} |
|||
|
|||
void OnUpdated(ARFace face) |
|||
{ |
|||
UpdateVisibility(); |
|||
UpdateFaceFeatures(); |
|||
} |
|||
|
|||
void UpdateFaceFeatures() |
|||
{ |
|||
if (skinnedMeshRenderer == null || !skinnedMeshRenderer.enabled || skinnedMeshRenderer.sharedMesh == null) |
|||
{ |
|||
return; |
|||
} |
|||
|
|||
#if UNITY_IOS
|
|||
if (!m_ArkitFaceSubsystem.TryGetFaceARKitBlendShapeCoefficients(m_Face.xrFace.trackableId,s_FaceArkitBlendShapeCoefficients)) |
|||
return; |
|||
|
|||
foreach (var xrFaceFeatureCoefficient in s_FaceArkitBlendShapeCoefficients) |
|||
{ |
|||
int mappedBlendShapeIndex; |
|||
if (m_FaceArkitBlendShapeIndexMap.TryGetValue(xrFaceFeatureCoefficient.arkitBlendShapeLocation, out mappedBlendShapeIndex)) |
|||
{ |
|||
if (mappedBlendShapeIndex >= 0 ) |
|||
{ |
|||
skinnedMeshRenderer.SetBlendShapeWeight (mappedBlendShapeIndex, xrFaceFeatureCoefficient.coefficient * coefficientScale); |
|||
} |
|||
} |
|||
} |
|||
#endif
|
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 77136493c3caf4805ac5a602f75072e0 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using System.IO; |
|||
using Unity.Collections; |
|||
using UnityEngine; |
|||
using UnityEngine.UI; |
|||
using UnityEngine.XR.ARFoundation; |
|||
#if UNITY_IOS
|
|||
using UnityEngine.XR.ARKit; |
|||
#endif
|
|||
|
|||
/// <summary>
|
|||
/// Demonstrates the saving and loading of an
|
|||
/// <a href="https://developer.apple.com/documentation/arkit/arworldmap">ARWorldMap</a>
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// ARWorldMaps are only supported by ARKit, so this API is in the
|
|||
/// <c>UntyEngine.XR.ARKit</c> namespace.
|
|||
/// </remarks>
|
|||
public class ARWorldMapController : MonoBehaviour |
|||
{ |
|||
[Tooltip("The ARSession component controlling the session from which to generate ARWorldMaps.")] |
|||
[SerializeField] |
|||
ARSession m_ARSession; |
|||
|
|||
/// <summary>
|
|||
/// The ARSession component controlling the session from which to generate ARWorldMaps.
|
|||
/// </summary>
|
|||
public ARSession arSession |
|||
{ |
|||
get { return m_ARSession; } |
|||
set { m_ARSession = value; } |
|||
} |
|||
|
|||
[Tooltip("UI Text component to display error messages")] |
|||
[SerializeField] |
|||
Text m_ErrorText; |
|||
|
|||
/// <summary>
|
|||
/// The UI Text component used to display error messages
|
|||
/// </summary>
|
|||
public Text errorText |
|||
{ |
|||
get { return m_ErrorText; } |
|||
set { m_ErrorText = value; } |
|||
} |
|||
|
|||
[Tooltip("The UI Text element used to display log messages.")] |
|||
[SerializeField] |
|||
Text m_LogText; |
|||
|
|||
/// <summary>
|
|||
/// The UI Text element used to display log messages.
|
|||
/// </summary>
|
|||
public Text logText |
|||
{ |
|||
get { return m_LogText; } |
|||
set { m_LogText = value; } |
|||
} |
|||
|
|||
[Tooltip("The UI Text element used to display the current AR world mapping status.")] |
|||
[SerializeField] |
|||
Text m_MappingStatusText; |
|||
|
|||
/// <summary>
|
|||
/// The UI Text element used to display the current AR world mapping status.
|
|||
/// </summary>
|
|||
public Text mappingStatusText |
|||
{ |
|||
get { return m_MappingStatusText; } |
|||
set { m_MappingStatusText = value; } |
|||
} |
|||
|
|||
[Tooltip("A UI button component which will generate an ARWorldMap and save it to disk.")] |
|||
[SerializeField] |
|||
Button m_SaveButton; |
|||
|
|||
/// <summary>
|
|||
/// A UI button component which will generate an ARWorldMap and save it to disk.
|
|||
/// </summary>
|
|||
public Button saveButton |
|||
{ |
|||
get { return m_SaveButton; } |
|||
set { m_SaveButton = value; } |
|||
} |
|||
|
|||
[Tooltip("A UI button component which will load a previously saved ARWorldMap from disk and apply it to the current session.")] |
|||
[SerializeField] |
|||
Button m_LoadButton; |
|||
|
|||
/// <summary>
|
|||
/// A UI button component which will load a previously saved ARWorldMap from disk and apply it to the current session.
|
|||
/// </summary>
|
|||
public Button loadButton |
|||
{ |
|||
get { return m_LoadButton; } |
|||
set { m_LoadButton = value; } |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Create an <c>ARWorldMap</c> and save it to disk.
|
|||
/// </summary>
|
|||
public void OnSaveButton() |
|||
{ |
|||
#if UNITY_IOS
|
|||
StartCoroutine(Save()); |
|||
#endif
|
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Load an <c>ARWorldMap</c> from disk and apply it
|
|||
/// to the current session.
|
|||
/// </summary>
|
|||
public void OnLoadButton() |
|||
{ |
|||
#if UNITY_IOS
|
|||
StartCoroutine(Load()); |
|||
#endif
|
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Reset the <c>ARSession</c>, destroying any existing trackables,
|
|||
/// such as planes. Upon loading a saved <c>ARWorldMap</c>, saved
|
|||
/// trackables will be restored.
|
|||
/// </summary>
|
|||
public void OnResetButton() |
|||
{ |
|||
m_ARSession.Reset(); |
|||
} |
|||
|
|||
#if UNITY_IOS
|
|||
IEnumerator Save() |
|||
{ |
|||
var sessionSubsystem = ARSubsystemManager.sessionSubsystem; |
|||
if (sessionSubsystem == null) |
|||
{ |
|||
Log("No session subsystem available. Could not save."); |
|||
yield break; |
|||
} |
|||
|
|||
var request = sessionSubsystem.GetARWorldMapAsync(); |
|||
|
|||
while (!request.status.IsDone()) |
|||
yield return null; |
|||
|
|||
if (request.status.IsError()) |
|||
{ |
|||
Log(string.Format("Session serialization failed with status {0}", request.status)); |
|||
yield break; |
|||
} |
|||
|
|||
var worldMap = request.GetWorldMap(); |
|||
request.Dispose(); |
|||
|
|||
SaveAndDisposeWorldMap(worldMap); |
|||
} |
|||
|
|||
IEnumerator Load() |
|||
{ |
|||
var sessionSubsystem = ARSubsystemManager.sessionSubsystem; |
|||
if (sessionSubsystem == null) |
|||
{ |
|||
Log("No session subsystem available. Could not load."); |
|||
yield break; |
|||
} |
|||
|
|||
var file = File.Open(path, FileMode.Open); |
|||
if (file == null) |
|||
{ |
|||
Log(string.Format("File {0} does not exist.", path)); |
|||
yield break; |
|||
} |
|||
|
|||
Log(string.Format("Reading {0}...", path)); |
|||
|
|||
int bytesPerFrame = 1024 * 10; |
|||
var bytesRemaining = file.Length; |
|||
var binaryReader = new BinaryReader(file); |
|||
var allBytes = new List<byte>(); |
|||
while (bytesRemaining > 0) |
|||
{ |
|||
var bytes = binaryReader.ReadBytes(bytesPerFrame); |
|||
allBytes.AddRange(bytes); |
|||
bytesRemaining -= bytesPerFrame; |
|||
yield return null; |
|||
} |
|||
|
|||
var data = new NativeArray<byte>(allBytes.Count, Allocator.Temp); |
|||
data.CopyFrom(allBytes.ToArray()); |
|||
|
|||
Log(string.Format("Deserializing to ARWorldMap...", path)); |
|||
ARWorldMap worldMap; |
|||
if (ARWorldMap.TryDeserialize(data, out worldMap)) |
|||
data.Dispose(); |
|||
|
|||
if (worldMap.valid) |
|||
{ |
|||
Log("Deserialized successfully."); |
|||
} |
|||
else |
|||
{ |
|||
Debug.LogError("Data is not a valid ARWorldMap."); |
|||
yield break; |
|||
} |
|||
|
|||
Log("Apply ARWorldMap to current session."); |
|||
sessionSubsystem.ApplyWorldMap(worldMap); |
|||
} |
|||
|
|||
void SaveAndDisposeWorldMap(ARWorldMap worldMap) |
|||
{ |
|||
Log("Serializing ARWorldMap to byte array..."); |
|||
var data = worldMap.Serialize(Allocator.Temp); |
|||
Log(string.Format("ARWorldMap has {0} bytes.", data.Length)); |
|||
|
|||
var file = File.Open(path, FileMode.Create); |
|||
var writer = new BinaryWriter(file); |
|||
writer.Write(data.ToArray()); |
|||
writer.Close(); |
|||
data.Dispose(); |
|||
worldMap.Dispose(); |
|||
Log(string.Format("ARWorldMap written to {0}", path)); |
|||
} |
|||
#endif
|
|||
|
|||
string path |
|||
{ |
|||
get |
|||
{ |
|||
return Path.Combine(Application.persistentDataPath, "my_session.worldmap"); |
|||
} |
|||
} |
|||
|
|||
bool supported |
|||
{ |
|||
get |
|||
{ |
|||
#if UNITY_IOS
|
|||
var sessionSubsystem = ARSubsystemManager.sessionSubsystem; |
|||
if (sessionSubsystem != null) |
|||
return sessionSubsystem.WorldMapSupported(); |
|||
#endif
|
|||
return false; |
|||
} |
|||
} |
|||
|
|||
void Awake() |
|||
{ |
|||
m_LogMessages = new List<string>(); |
|||
} |
|||
|
|||
void Log(string logMessage) |
|||
{ |
|||
m_LogMessages.Add(logMessage); |
|||
} |
|||
|
|||
static void SetActive(Button button, bool active) |
|||
{ |
|||
if (button != null) |
|||
button.gameObject.SetActive(active); |
|||
} |
|||
|
|||
static void SetActive(Text text, bool active) |
|||
{ |
|||
if (text != null) |
|||
text.gameObject.SetActive(active); |
|||
} |
|||
|
|||
static void SetText(Text text, string value) |
|||
{ |
|||
if (text != null) |
|||
text.text = value; |
|||
} |
|||
|
|||
void Update() |
|||
{ |
|||
if (supported) |
|||
{ |
|||
SetActive(errorText, false); |
|||
SetActive(saveButton, true); |
|||
SetActive(loadButton, true); |
|||
SetActive(mappingStatusText, true); |
|||
} |
|||
else |
|||
{ |
|||
SetActive(errorText, true); |
|||
SetActive(saveButton, false); |
|||
SetActive(loadButton, false); |
|||
SetActive(mappingStatusText, false); |
|||
} |
|||
|
|||
var sessionSubsystem = ARSubsystemManager.sessionSubsystem; |
|||
if (sessionSubsystem == null) |
|||
return; |
|||
|
|||
var numLogsToShow = 20; |
|||
string msg = ""; |
|||
for (int i = Mathf.Max(0, m_LogMessages.Count - numLogsToShow); i < m_LogMessages.Count; ++i) |
|||
{ |
|||
msg += m_LogMessages[i]; |
|||
msg += "\n"; |
|||
} |
|||
SetText(logText, msg); |
|||
|
|||
#if UNITY_IOS
|
|||
SetText(mappingStatusText, string.Format("Mapping Status: {0}", sessionSubsystem.GetWorldMappingStatus())); |
|||
#endif
|
|||
} |
|||
|
|||
List<string> m_LogMessages; |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 650a45a045e92478a9d4ce3ff7858893 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using UnityEngine.UI; |
|||
using UnityEngine.XR.ARExtensions; |
|||
using UnityEngine.XR.ARFoundation; |
|||
|
|||
/// <summary>
|
|||
/// Populates a drop down UI element with all the supported
|
|||
/// camera configurations and changes the active camera
|
|||
/// configuration when the user changes the selection in the dropdown.
|
|||
///
|
|||
/// The camera configuration affects the resolution (and possibly framerate)
|
|||
/// of the hardware camera during an AR session.
|
|||
/// </summary>
|
|||
[RequireComponent(typeof(Dropdown))] |
|||
public class CameraConfigController : MonoBehaviour |
|||
{ |
|||
List<string> m_ConfigurationNames; |
|||
|
|||
Dropdown m_Dropdown; |
|||
|
|||
/// <summary>
|
|||
/// Callback invoked when <see cref="m_Dropdown"/> changes. This
|
|||
/// lets us change the camera configuration when the user changes
|
|||
/// the selection in the UI.
|
|||
/// </summary>
|
|||
/// <param name="dropdown">The <c>Dropdown</c> which changed.</param>
|
|||
public void OnValueChanged(Dropdown dropdown) |
|||
{ |
|||
var cameraSubsystem = ARSubsystemManager.cameraSubsystem; |
|||
if (cameraSubsystem == null) |
|||
return; |
|||
|
|||
var configurationIndex = dropdown.value; |
|||
|
|||
// Check that the value makes sense
|
|||
var configurations = cameraSubsystem.Configurations(); |
|||
if (configurationIndex >= configurations.count) |
|||
return; |
|||
|
|||
// Get that configuration by index
|
|||
var configuration = configurations[configurationIndex]; |
|||
|
|||
// Make it the active one
|
|||
cameraSubsystem.SetCurrentConfiguration(configuration); |
|||
} |
|||
|
|||
void Awake() |
|||
{ |
|||
m_Dropdown = GetComponent<Dropdown>(); |
|||
m_Dropdown.ClearOptions(); |
|||
m_ConfigurationNames = new List<string>(); |
|||
} |
|||
|
|||
void PopulateDropdown() |
|||
{ |
|||
var cameraSubsystem = ARSubsystemManager.cameraSubsystem; |
|||
if (cameraSubsystem == null) |
|||
return; |
|||
|
|||
// No configurations available probably means this feature
|
|||
// isn't supported by the current device.
|
|||
var configurations = cameraSubsystem.Configurations(); |
|||
if (configurations.count == 0) |
|||
return; |
|||
|
|||
// There are two ways to enumerate the camera configurations.
|
|||
|
|||
// 1. Use a foreach to iterate over all the available configurations
|
|||
foreach (var config in configurations) |
|||
m_ConfigurationNames.Add(config.ToString()); |
|||
m_Dropdown.AddOptions(m_ConfigurationNames); |
|||
|
|||
// 2. Use a normal for...loop
|
|||
var currentConfig = cameraSubsystem.GetCurrentConfiguration(); |
|||
for (int i = 0; i < configurations.count; i++) |
|||
{ |
|||
// Find the current configuration and update the drop down value
|
|||
if (currentConfig == configurations[i]) |
|||
m_Dropdown.value = i; |
|||
} |
|||
} |
|||
|
|||
void Update() |
|||
{ |
|||
if (m_ConfigurationNames.Count == 0) |
|||
PopulateDropdown(); |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 94b653a1faa6f4749ad83e77bcddfab4 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using UnityEngine; |
|||
using UnityEngine.Experimental.XR; |
|||
using UnityEngine.UI; |
|||
using UnityEngine.XR.ARFoundation; |
|||
|
|||
/// <summary>
|
|||
/// This example demonstrates disabling vertical planes as they are
|
|||
/// detected and instantiated by the <c>ARPlaneManager</c>.
|
|||
/// </summary>
|
|||
[RequireComponent(typeof(ARPlaneManager))] |
|||
public class DisableVerticalPlanes : MonoBehaviour |
|||
{ |
|||
[Tooltip("The UI Text element used to display log messages.")] |
|||
[SerializeField] |
|||
Text m_LogText; |
|||
|
|||
/// <summary>
|
|||
/// The UI Text element used to display log messages.
|
|||
/// </summary>
|
|||
public Text logText |
|||
{ |
|||
get { return m_LogText; } |
|||
set { m_LogText = value; } |
|||
} |
|||
|
|||
void OnEnable() |
|||
{ |
|||
GetComponent<ARPlaneManager>().planeAdded += OnPlaneAdded; |
|||
} |
|||
|
|||
void OnDisable() |
|||
{ |
|||
GetComponent<ARPlaneManager>().planeAdded -= OnPlaneAdded; |
|||
} |
|||
|
|||
void OnPlaneAdded(ARPlaneAddedEventArgs eventArgs) |
|||
{ |
|||
var plane = eventArgs.plane; |
|||
|
|||
// Check whether the plane is a vertical plane.
|
|||
if (plane.boundedPlane.Alignment == PlaneAlignment.Vertical) |
|||
{ |
|||
// Disable the entire GameObject.
|
|||
plane.gameObject.SetActive(false); |
|||
|
|||
// Add to our log so the user knows something happened.
|
|||
if (logText != null) |
|||
logText.text = string.Format("\n{0}", plane.boundedPlane.Id); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: f345ef94406845c408aeb1297c5d48d5 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System; |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using UnityEngine.Experimental.XR; |
|||
using UnityEngine.XR.ARFoundation; |
|||
|
|||
[RequireComponent(typeof(ARSessionOrigin))] |
|||
public class PlaceMultipleObjectsOnPlane : MonoBehaviour |
|||
{ |
|||
[SerializeField] |
|||
[Tooltip("Instantiates this prefab on a plane at the touch location.")] |
|||
GameObject m_PlacedPrefab; |
|||
|
|||
/// <summary>
|
|||
/// The prefab to instantiate on touch.
|
|||
/// </summary>
|
|||
public GameObject placedPrefab |
|||
{ |
|||
get { return m_PlacedPrefab; } |
|||
set { m_PlacedPrefab = value; } |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// The object instantiated as a result of a successful raycast intersection with a plane.
|
|||
/// </summary>
|
|||
public GameObject spawnedObject { get; private set; } |
|||
|
|||
/// <summary>
|
|||
/// Invoked whenever an object is placed in on a plane.
|
|||
/// </summary>
|
|||
public static event Action onPlacedObject; |
|||
|
|||
ARSessionOrigin m_SessionOrigin; |
|||
|
|||
static List<ARRaycastHit> s_Hits = new List<ARRaycastHit>(); |
|||
|
|||
void Awake() |
|||
{ |
|||
m_SessionOrigin = GetComponent<ARSessionOrigin>(); |
|||
} |
|||
|
|||
void Update() |
|||
{ |
|||
if (Input.touchCount > 0) |
|||
{ |
|||
Touch touch = Input.GetTouch(0); |
|||
|
|||
if (touch.phase == TouchPhase.Began) |
|||
{ |
|||
if (m_SessionOrigin.Raycast(touch.position, s_Hits, TrackableType.PlaneWithinPolygon)) |
|||
{ |
|||
Pose hitPose = s_Hits[0].pose; |
|||
|
|||
spawnedObject = Instantiate(m_PlacedPrefab, hitPose.position, hitPose.rotation); |
|||
|
|||
if (onPlacedObject != null) |
|||
{ |
|||
onPlacedObject(); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: e5fd398e1be2b4a428e25850033f4a7c |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using UnityEngine.UI; |
|||
using UnityEngine.XR.ARFoundation; |
|||
|
|||
/// <summary>
|
|||
/// This example demonstrates how to toggle plane detection,
|
|||
/// and also hide or show the existing planes.
|
|||
/// </summary>
|
|||
[RequireComponent(typeof(ARPlaneManager))] |
|||
public class PlaneDetectionController : MonoBehaviour |
|||
{ |
|||
[Tooltip("The UI Text element used to display plane detection messages.")] |
|||
[SerializeField] |
|||
Text m_TogglePlaneDetectionText; |
|||
|
|||
/// <summary>
|
|||
/// The UI Text element used to display plane detection messages.
|
|||
/// </summary>
|
|||
public Text togglePlaneDetectionText |
|||
{ |
|||
get { return m_TogglePlaneDetectionText; } |
|||
set { m_TogglePlaneDetectionText = value; } |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Toggles plane detection and the visualization of the planes.
|
|||
/// </summary>
|
|||
public void TogglePlaneDetection() |
|||
{ |
|||
m_ARPlaneManager.enabled = !m_ARPlaneManager.enabled; |
|||
|
|||
string planeDetectionMessage = ""; |
|||
if (m_ARPlaneManager.enabled) |
|||
{ |
|||
planeDetectionMessage = "Disable Plane Detection and Hide Existing"; |
|||
SetAllPlanesActive(true); |
|||
} |
|||
else |
|||
{ |
|||
planeDetectionMessage = "Enable Plane Detection and Show Existing"; |
|||
SetAllPlanesActive(false); |
|||
} |
|||
|
|||
if (togglePlaneDetectionText != null) |
|||
togglePlaneDetectionText.text = planeDetectionMessage; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Iterates over all the existing planes and activates
|
|||
/// or deactivates their <c>GameObject</c>s'.
|
|||
/// </summary>
|
|||
/// <param name="value">Each planes' GameObject is SetActive with this value.</param>
|
|||
void SetAllPlanesActive(bool value) |
|||
{ |
|||
m_ARPlaneManager.GetAllPlanes(s_Planes); |
|||
foreach (var plane in s_Planes) |
|||
plane.gameObject.SetActive(value); |
|||
} |
|||
|
|||
void Awake() |
|||
{ |
|||
m_ARPlaneManager = GetComponent<ARPlaneManager>(); |
|||
} |
|||
|
|||
ARPlaneManager m_ARPlaneManager; |
|||
|
|||
static List<ARPlane> s_Planes = new List<ARPlane>(); |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 5848dfc05b1289c499a50f5ee66ea01b |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
/// <summary>
|
|||
/// Simple MonoBehaviour to set the Application's targetFrameRate
|
|||
/// </summary>
|
|||
public class SetTargetFramerate : MonoBehaviour |
|||
{ |
|||
[SerializeField] |
|||
[Tooltip("Sets the application's target frame rate.")] |
|||
int m_TargetFrameRate = 60; |
|||
|
|||
/// <summary>
|
|||
/// Get or set the application's target frame rate.
|
|||
/// </summary>
|
|||
public int targetFrameRate |
|||
{ |
|||
get { return m_TargetFrameRate; } |
|||
set |
|||
{ |
|||
m_TargetFrameRate = value; |
|||
SetFrameRate(); |
|||
} |
|||
} |
|||
|
|||
void SetFrameRate() |
|||
{ |
|||
Application.targetFrameRate = targetFrameRate; |
|||
} |
|||
|
|||
void Start() |
|||
{ |
|||
SetFrameRate(); |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 1eb9777efa8174381b01d319232f7df5 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System; |
|||
using Unity.Collections.LowLevel.Unsafe; |
|||
using UnityEngine; |
|||
using UnityEngine.UI; |
|||
using UnityEngine.XR.ARExtensions; |
|||
using UnityEngine.XR.ARFoundation; |
|||
|
|||
/// <summary>
|
|||
/// This component tests getting the latest camera image
|
|||
/// and converting it to RGBA format. If successful,
|
|||
/// it displays the image on the screen as a RawImage
|
|||
/// and also displays information about the image.
|
|||
///
|
|||
/// This is useful for computer vision applications where
|
|||
/// you need to access the raw pixels from camera image
|
|||
/// on the CPU.
|
|||
///
|
|||
/// This is different from the ARCameraBackground component, which
|
|||
/// efficiently displays the camera image on the screen. If you
|
|||
/// just want to blit the camera texture to the screen, use
|
|||
/// the ARCameraBackground, or use Graphics.Blit to create
|
|||
/// a GPU-friendly RenderTexture.
|
|||
///
|
|||
/// In this example, we get the camera image data on the CPU,
|
|||
/// convert it to an RGBA format, then display it on the screen
|
|||
/// as a RawImage texture to demonstrate it is working.
|
|||
/// This is done as an example; do not use this technique simply
|
|||
/// to render the camera image on screen.
|
|||
/// </summary>
|
|||
public class TestCameraImage : MonoBehaviour |
|||
{ |
|||
[SerializeField] |
|||
RawImage m_RawImage; |
|||
|
|||
/// <summary>
|
|||
/// The UI RawImage used to display the image on screen.
|
|||
/// </summary>
|
|||
public RawImage rawImage |
|||
{ |
|||
get { return m_RawImage; } |
|||
set { m_RawImage = value; } |
|||
} |
|||
|
|||
[SerializeField] |
|||
Text m_ImageInfo; |
|||
|
|||
/// <summary>
|
|||
/// The UI Text used to display information about the image on screen.
|
|||
/// </summary>
|
|||
public Text imageInfo |
|||
{ |
|||
get { return m_ImageInfo; } |
|||
set { m_ImageInfo = value; } |
|||
} |
|||
|
|||
void OnEnable() |
|||
{ |
|||
ARSubsystemManager.cameraFrameReceived += OnCameraFrameReceived; |
|||
} |
|||
|
|||
void OnDisable() |
|||
{ |
|||
ARSubsystemManager.cameraFrameReceived -= OnCameraFrameReceived; |
|||
} |
|||
|
|||
unsafe void OnCameraFrameReceived(ARCameraFrameEventArgs eventArgs) |
|||
{ |
|||
// Attempt to get the latest camera image. If this method succeeds,
|
|||
// it acquires a native resource that must be disposed (see below).
|
|||
CameraImage image; |
|||
if (!ARSubsystemManager.cameraSubsystem.TryGetLatestImage(out image)) |
|||
return; |
|||
|
|||
// Display some information about the camera image
|
|||
m_ImageInfo.text = string.Format( |
|||
"Image info:\n\twidth: {0}\n\theight: {1}\n\tplaneCount: {2}\n\ttimestamp: {3}\n\tformat: {4}", |
|||
image.width, image.height, image.planeCount, image.timestamp, image.format); |
|||
|
|||
// Once we have a valid CameraImage, we can access the individual image "planes"
|
|||
// (the separate channels in the image). CameraImage.GetPlane provides
|
|||
// low-overhead access to this data. This could then be passed to a
|
|||
// computer vision algorithm. Here, we will convert the camera image
|
|||
// to an RGBA texture and draw it on the screen.
|
|||
|
|||
// Choose an RGBA format.
|
|||
// See CameraImage.FormatSupported for a complete list of supported formats.
|
|||
var format = TextureFormat.RGBA32; |
|||
|
|||
if (m_Texture == null || m_Texture.width != image.width || m_Texture.height != image.height) |
|||
m_Texture = new Texture2D(image.width, image.height, format, false); |
|||
|
|||
// Convert the image to format, flipping the image across the Y axis.
|
|||
// We can also get a sub rectangle, but we'll get the full image here.
|
|||
var conversionParams = new CameraImageConversionParams(image, format, CameraImageTransformation.MirrorY); |
|||
|
|||
// Texture2D allows us write directly to the raw texture data
|
|||
// This allows us to do the conversion in-place without making any copies.
|
|||
var rawTextureData = m_Texture.GetRawTextureData<byte>(); |
|||
try |
|||
{ |
|||
image.Convert(conversionParams, new IntPtr(rawTextureData.GetUnsafePtr()), rawTextureData.Length); |
|||
} |
|||
finally |
|||
{ |
|||
// We must dispose of the CameraImage after we're finished
|
|||
// with it to avoid leaking native resources.
|
|||
image.Dispose(); |
|||
} |
|||
|
|||
// Apply the updated texture data to our texture
|
|||
m_Texture.Apply(); |
|||
|
|||
// Set the RawImage's texture so we can visualize it.
|
|||
m_RawImage.texture = m_Texture; |
|||
} |
|||
|
|||
Texture2D m_Texture; |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: c6e58200659977344ad301e3a0f6e8d7 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 02a12bc9566ff423d9c949cc6408db7c |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: c8240f56f5bca4387a34716c42b57c76 |
|||
TextureImporter: |
|||
fileIDToRecycleName: {} |
|||
externalObjects: {} |
|||
serializedVersion: 7 |
|||
mipmaps: |
|||
mipMapMode: 0 |
|||
enableMipMap: 1 |
|||
sRGBTexture: 1 |
|||
linearTexture: 0 |
|||
fadeOut: 0 |
|||
borderMipMap: 0 |
|||
mipMapsPreserveCoverage: 0 |
|||
alphaTestReferenceValue: 0.5 |
|||
mipMapFadeDistanceStart: 1 |
|||
mipMapFadeDistanceEnd: 3 |
|||
bumpmap: |
|||
convertToNormalMap: 0 |
|||
externalNormalMap: 0 |
|||
heightScale: 0.25 |
|||
normalMapFilter: 0 |
|||
isReadable: 0 |
|||
streamingMipmaps: 0 |
|||
streamingMipmapsPriority: 0 |
|||
grayScaleToAlpha: 0 |
|||
generateCubemap: 6 |
|||
cubemapConvolution: 0 |
|||
seamlessCubemap: 0 |
|||
textureFormat: 1 |
|||
maxTextureSize: 2048 |
|||
textureSettings: |
|||
serializedVersion: 2 |
|||
filterMode: -1 |
|||
aniso: -1 |
|||
mipBias: -100 |
|||
wrapU: -1 |
|||
wrapV: -1 |
|||
wrapW: -1 |
|||
nPOTScale: 1 |
|||
lightmap: 0 |
|||
compressionQuality: 50 |
|||
spriteMode: 0 |
|||
spriteExtrude: 1 |
|||
spriteMeshType: 1 |
|||
alignment: 0 |
|||
spritePivot: {x: 0.5, y: 0.5} |
|||
spritePixelsToUnits: 100 |
|||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
|||
spriteGenerateFallbackPhysicsShape: 1 |
|||
alphaUsage: 1 |
|||
alphaIsTransparency: 0 |
|||
spriteTessellationDetail: -1 |
|||
textureType: 0 |
|||
textureShape: 1 |
|||
singleChannelComponent: 0 |
|||
maxTextureSizeSet: 0 |
|||
compressionQualitySet: 0 |
|||
textureFormatSet: 0 |
|||
platformSettings: |
|||
- serializedVersion: 2 |
|||
buildTarget: DefaultTexturePlatform |
|||
maxTextureSize: 2048 |
|||
resizeAlgorithm: 0 |
|||
textureFormat: -1 |
|||
textureCompression: 1 |
|||
compressionQuality: 50 |
|||
crunchedCompression: 0 |
|||
allowsAlphaSplitting: 0 |
|||
overridden: 0 |
|||
androidETC2FallbackOverride: 0 |
|||
spriteSheet: |
|||
serializedVersion: 2 |
|||
sprites: [] |
|||
outline: [] |
|||
physicsShape: [] |
|||
bones: [] |
|||
spriteID: |
|||
vertices: [] |
|||
indices: |
|||
edges: [] |
|||
weights: [] |
|||
spritePackingTag: |
|||
pSDRemoveMatte: 0 |
|||
pSDShowRemoveMatteOption: 0 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: cf0c720f1ba9b47e293f4b9bcfb2ecb4 |
|||
TextureImporter: |
|||
fileIDToRecycleName: {} |
|||
externalObjects: {} |
|||
serializedVersion: 7 |
|||
mipmaps: |
|||
mipMapMode: 0 |
|||
enableMipMap: 1 |
|||
sRGBTexture: 1 |
|||
linearTexture: 0 |
|||
fadeOut: 0 |
|||
borderMipMap: 0 |
|||
mipMapsPreserveCoverage: 0 |
|||
alphaTestReferenceValue: 0.5 |
|||
mipMapFadeDistanceStart: 1 |
|||
mipMapFadeDistanceEnd: 3 |
|||
bumpmap: |
|||
convertToNormalMap: 0 |
|||
externalNormalMap: 0 |
|||
heightScale: 0.25 |
|||
normalMapFilter: 0 |
|||
isReadable: 0 |
|||
streamingMipmaps: 0 |
|||
streamingMipmapsPriority: 0 |
|||
grayScaleToAlpha: 0 |
|||
generateCubemap: 6 |
|||
cubemapConvolution: 0 |
|||
seamlessCubemap: 0 |
|||
textureFormat: 1 |
|||
maxTextureSize: 2048 |
|||
textureSettings: |
|||
serializedVersion: 2 |
|||
filterMode: -1 |
|||
aniso: -1 |
|||
mipBias: -100 |
|||
wrapU: -1 |
|||
wrapV: -1 |
|||
wrapW: -1 |
|||
nPOTScale: 1 |
|||
lightmap: 0 |
|||
compressionQuality: 50 |
|||
spriteMode: 0 |
|||
spriteExtrude: 1 |
|||
spriteMeshType: 1 |
|||
alignment: 0 |
|||
spritePivot: {x: 0.5, y: 0.5} |
|||
spritePixelsToUnits: 100 |
|||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
|||
spriteGenerateFallbackPhysicsShape: 1 |
|||
alphaUsage: 1 |
|||
alphaIsTransparency: 0 |
|||
spriteTessellationDetail: -1 |
|||
textureType: 0 |
|||
textureShape: 1 |
|||
singleChannelComponent: 0 |
|||
maxTextureSizeSet: 0 |
|||
compressionQualitySet: 0 |
|||
textureFormatSet: 0 |
|||
platformSettings: |
|||
- serializedVersion: 2 |
|||
buildTarget: DefaultTexturePlatform |
|||
maxTextureSize: 2048 |
|||
resizeAlgorithm: 0 |
|||
textureFormat: -1 |
|||
textureCompression: 1 |
|||
compressionQuality: 50 |
|||
crunchedCompression: 0 |
|||
allowsAlphaSplitting: 0 |
|||
overridden: 0 |
|||
androidETC2FallbackOverride: 0 |
|||
spriteSheet: |
|||
serializedVersion: 2 |
|||
sprites: [] |
|||
outline: [] |
|||
physicsShape: [] |
|||
bones: [] |
|||
spriteID: |
|||
vertices: [] |
|||
indices: |
|||
edges: [] |
|||
weights: [] |
|||
spritePackingTag: |
|||
pSDRemoveMatte: 0 |
|||
pSDShowRemoveMatteOption: 0 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
Assets/Textures/sloth_all_1001_AlbedoTransparency.png
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: b0a9b07b207264316bf3be95cdcf6a08 |
|||
timeCreated: 1510333546 |
|||
licenseType: Free |
|||
TextureImporter: |
|||
fileIDToRecycleName: {} |
|||
serializedVersion: 4 |
|||
mipmaps: |
|||
mipMapMode: 0 |
|||
enableMipMap: 1 |
|||
sRGBTexture: 1 |
|||
linearTexture: 0 |
|||
fadeOut: 0 |
|||
borderMipMap: 0 |
|||
mipMapFadeDistanceStart: 1 |
|||
mipMapFadeDistanceEnd: 3 |
|||
bumpmap: |
|||
convertToNormalMap: 0 |
|||
externalNormalMap: 0 |
|||
heightScale: 0.25 |
|||
normalMapFilter: 0 |
|||
isReadable: 0 |
|||
grayScaleToAlpha: 0 |
|||
generateCubemap: 6 |
|||
cubemapConvolution: 0 |
|||
seamlessCubemap: 0 |
|||
textureFormat: 1 |
|||
maxTextureSize: 2048 |
|||
textureSettings: |
|||
filterMode: -1 |
|||
aniso: -1 |
|||
mipBias: -1 |
|||
wrapMode: -1 |
|||
nPOTScale: 1 |
|||
lightmap: 0 |
|||
compressionQuality: 50 |
|||
spriteMode: 0 |
|||
spriteExtrude: 1 |
|||
spriteMeshType: 1 |
|||
alignment: 0 |
|||
spritePivot: {x: 0.5, y: 0.5} |
|||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
|||
spritePixelsToUnits: 100 |
|||
alphaUsage: 1 |
|||
alphaIsTransparency: 0 |
|||
spriteTessellationDetail: -1 |
|||
textureType: 0 |
|||
textureShape: 1 |
|||
maxTextureSizeSet: 0 |
|||
compressionQualitySet: 0 |
|||
textureFormatSet: 0 |
|||
platformSettings: |
|||
- buildTarget: DefaultTexturePlatform |
|||
maxTextureSize: 4096 |
|||
textureFormat: -1 |
|||
textureCompression: 1 |
|||
compressionQuality: 50 |
|||
crunchedCompression: 0 |
|||
allowsAlphaSplitting: 0 |
|||
overridden: 0 |
|||
- buildTarget: Standalone |
|||
maxTextureSize: 4096 |
|||
textureFormat: -1 |
|||
textureCompression: 1 |
|||
compressionQuality: 50 |
|||
crunchedCompression: 0 |
|||
allowsAlphaSplitting: 0 |
|||
overridden: 0 |
|||
spriteSheet: |
|||
serializedVersion: 2 |
|||
sprites: [] |
|||
outline: [] |
|||
spritePackingTag: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
Assets/Textures/sloth_all_1001_MetallicSmoothness.png
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: 433a9cacc6e034c25a6a14eb6af1b09c |
|||
timeCreated: 1510333569 |
|||
licenseType: Free |
|||
TextureImporter: |
|||
fileIDToRecycleName: {} |
|||
serializedVersion: 4 |
|||
mipmaps: |
|||
mipMapMode: 0 |
|||
enableMipMap: 1 |
|||
sRGBTexture: 1 |
|||
linearTexture: 0 |
|||
fadeOut: 0 |
|||
borderMipMap: 0 |
|||
mipMapFadeDistanceStart: 1 |
|||
mipMapFadeDistanceEnd: 3 |
|||
bumpmap: |
|||
convertToNormalMap: 0 |
|||
externalNormalMap: 0 |
|||
heightScale: 0.25 |
|||
normalMapFilter: 0 |
|||
isReadable: 0 |
|||
grayScaleToAlpha: 0 |
|||
generateCubemap: 6 |
|||
cubemapConvolution: 0 |
|||
seamlessCubemap: 0 |
|||
textureFormat: 1 |
|||
maxTextureSize: 2048 |
|||
textureSettings: |
|||
filterMode: -1 |
|||
aniso: -1 |
|||
mipBias: -1 |
|||
wrapMode: -1 |
|||
nPOTScale: 1 |
|||
lightmap: 0 |
|||
compressionQuality: 50 |
|||
spriteMode: 0 |
|||
spriteExtrude: 1 |
|||
spriteMeshType: 1 |
|||
alignment: 0 |
|||
spritePivot: {x: 0.5, y: 0.5} |
|||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
|||
spritePixelsToUnits: 100 |
|||
alphaUsage: 1 |
|||
alphaIsTransparency: 0 |
|||
spriteTessellationDetail: -1 |
|||
textureType: 0 |
|||
textureShape: 1 |
|||
maxTextureSizeSet: 0 |
|||
compressionQualitySet: 0 |
|||
textureFormatSet: 0 |
|||
platformSettings: |
|||
- buildTarget: DefaultTexturePlatform |
|||
maxTextureSize: 4096 |
|||
textureFormat: -1 |
|||
textureCompression: 1 |
|||
compressionQuality: 50 |
|||
crunchedCompression: 0 |
|||
allowsAlphaSplitting: 0 |
|||
overridden: 0 |
|||
- buildTarget: Standalone |
|||
maxTextureSize: 4096 |
|||
textureFormat: -1 |
|||
textureCompression: 1 |
|||
compressionQuality: 50 |
|||
crunchedCompression: 0 |
|||
allowsAlphaSplitting: 0 |
|||
overridden: 0 |
|||
spriteSheet: |
|||
serializedVersion: 2 |
|||
sprites: [] |
|||
outline: [] |
|||
spritePackingTag: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
Assets/Textures/sloth_all_1001_Normal.png
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: 27a1657365e7440158436bc8e151d931 |
|||
timeCreated: 1510333583 |
|||
licenseType: Free |
|||
TextureImporter: |
|||
fileIDToRecycleName: {} |
|||
serializedVersion: 4 |
|||
mipmaps: |
|||
mipMapMode: 0 |
|||
enableMipMap: 1 |
|||
sRGBTexture: 0 |
|||
linearTexture: 0 |
|||
fadeOut: 0 |
|||
borderMipMap: 0 |
|||
mipMapFadeDistanceStart: 1 |
|||
mipMapFadeDistanceEnd: 3 |
|||
bumpmap: |
|||
convertToNormalMap: 0 |
|||
externalNormalMap: 0 |
|||
heightScale: 0.25 |
|||
normalMapFilter: 0 |
|||
isReadable: 0 |
|||
grayScaleToAlpha: 0 |
|||
generateCubemap: 6 |
|||
cubemapConvolution: 0 |
|||
seamlessCubemap: 0 |
|||
textureFormat: 1 |
|||
maxTextureSize: 2048 |
|||
textureSettings: |
|||
filterMode: -1 |
|||
aniso: -1 |
|||
mipBias: -1 |
|||
wrapMode: -1 |
|||
nPOTScale: 1 |
|||
lightmap: 0 |
|||
compressionQuality: 50 |
|||
spriteMode: 0 |
|||
spriteExtrude: 1 |
|||
spriteMeshType: 1 |
|||
alignment: 0 |
|||
spritePivot: {x: 0.5, y: 0.5} |
|||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
|||
spritePixelsToUnits: 100 |
|||
alphaUsage: 1 |
|||
alphaIsTransparency: 0 |
|||
spriteTessellationDetail: -1 |
|||
textureType: 1 |
|||
textureShape: 1 |
|||
maxTextureSizeSet: 0 |
|||
compressionQualitySet: 0 |
|||
textureFormatSet: 0 |
|||
platformSettings: |
|||
- buildTarget: DefaultTexturePlatform |
|||
maxTextureSize: 4096 |
|||
textureFormat: -1 |
|||
textureCompression: 1 |
|||
compressionQuality: 50 |
|||
crunchedCompression: 0 |
|||
allowsAlphaSplitting: 0 |
|||
overridden: 0 |
|||
- buildTarget: Standalone |
|||
maxTextureSize: 4096 |
|||
textureFormat: -1 |
|||
textureCompression: 1 |
|||
compressionQuality: 50 |
|||
crunchedCompression: 0 |
|||
allowsAlphaSplitting: 0 |
|||
overridden: 0 |
|||
spriteSheet: |
|||
serializedVersion: 2 |
|||
sprites: [] |
|||
outline: [] |
|||
spritePackingTag: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
部分文件因为文件数量过多而无法显示
撰写
预览
正在加载...
取消
保存
Reference in new issue