Alexandra Serralta
4 年前
当前提交
bb22dd9a
共有 144 个文件被更改,包括 17376 次插入 和 102 次删除
-
911Assets/Scenes/ARFoundationMenu/Menu.unity
-
2Assets/Scenes/CpuImages.unity
-
920Assets/Scenes/Depth/DepthImages.unity
-
2Assets/Scenes/ImageTracking/DynamicLibrary.cs
-
4Assets/Scripts/CameraConfigController.cs
-
33Assets/Scripts/UX/ARSceneSelectUI.cs
-
1Assets/Scripts/UX/ActiveMenu.cs
-
9Assets/Scripts/UX/CheckAvailableFeatures.cs
-
457Assets/Scripts/DisplayDepthImage.cs
-
8ProjectSettings/EditorBuildSettings.asset
-
2ProjectSettings/ProjectSettings.asset
-
4ProjectSettings/ProjectVersion.txt
-
19README.md
-
33Assets/Scenes/ImageTracking/Prefabs/ImageInfoPrefab.prefab
-
80Assets/Materials/DepthGradientMaterial.mat
-
8Assets/Materials/DepthGradientMaterial.mat.meta
-
78Assets/Materials/HumanStencil.mat
-
8Assets/Materials/HumanStencil.mat.meta
-
8Assets/Scenes/Configurations.meta
-
8Assets/Scenes/ImageTracking/BasicImageTracking.meta
-
8Assets/Scenes/ImageTracking/ImageTrackingWithMultiplePrefabs.meta
-
8Assets/Scenes/ImageTracking/Prefabs.meta
-
41Assets/Scripts/CameraSwapper.cs
-
11Assets/Scripts/CameraSwapper.cs.meta
-
141Assets/Scripts/CustomConfigurationChooser.cs
-
11Assets/Scripts/CustomConfigurationChooser.cs.meta
-
166Assets/Scripts/DisplayARSessionInformation.cs
-
11Assets/Scripts/DisplayARSessionInformation.cs.meta
-
115Assets/Shaders/DepthGradient.shader
-
9Assets/Shaders/DepthGradient.shader.meta
-
93Assets/Shaders/HumanStencil.shader
-
9Assets/Shaders/HumanStencil.shader.meta
-
7Assets/Scenes/Configurations/ConfigurationChooser.unity.meta
-
63Assets/Scenes/Configurations/ConfigurationChooserSettings.lighting
-
8Assets/Scenes/Configurations/ConfigurationChooserSettings.lighting.meta
-
1001Assets/Scenes/Configurations/ConfigurationChooser.unity
-
147Assets/Scenes/ImageTracking/ImageTrackingWithMultiplePrefabs/DynamicPrefab.cs
-
11Assets/Scenes/ImageTracking/ImageTrackingWithMultiplePrefabs/DynamicPrefab.cs.meta
-
853Assets/Scenes/ImageTracking/ImageTrackingWithMultiplePrefabs/ImageTrackingWithMultiplePrefabs.unity
-
7Assets/Scenes/ImageTracking/ImageTrackingWithMultiplePrefabs/ImageTrackingWithMultiplePrefabs.unity.meta
-
11Assets/Scenes/ImageTracking/ImageTrackingWithMultiplePrefabs/PrefabImagePairManager.cs.meta
-
217Assets/Scenes/ImageTracking/ImageTrackingWithMultiplePrefabs/PrefabImagePairManager.cs
-
8Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab.meta
-
1001Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/FireFliesPrefab.prefab
-
7Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/FireFliesPrefab.prefab.meta
-
1001Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/Magic Spell - Sleeping spell 1.wav
-
23Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/Magic Spell - Sleeping spell 1.wav.meta
-
8Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/Materials.meta
-
92Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/Materials/FireFly.mat
-
8Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/Materials/FireFly.mat.meta
-
97Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/Materials/FireFlyTrail.mat
-
8Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/Materials/FireFlyTrail.mat.meta
-
8Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/Models.meta
-
75Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/Models/FireFly.fbx
-
94Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/Models/FireFly.fbx.meta
-
8Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/Prefabs.meta
-
1001Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/Prefabs/FireFliesPrefab.prefab
-
8Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/Prefabs/FireFliesPrefab.prefab.meta
-
79Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/Prefabs/ParticlesLight.prefab
-
8Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/Prefabs/ParticlesLight.prefab.meta
-
8Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/Shaders.meta
-
8Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/Textures.meta
-
1001Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/Textures/FireFlyAlbedo.tif
-
86Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/Textures/FireFlyAlbedo.tif.meta
-
1001Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/Textures/FireFlyEmission.tif
-
86Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/Textures/FireFlyEmission.tif.meta
-
362Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/Textures/FireFlyWings.png
-
86Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/Textures/FireFlyWings.png.meta
-
5Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/Textures/Ramp01.png
-
86Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/Textures/Ramp01.png.meta
-
9Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/Shaders/FireFly.shader.meta
-
110Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/Shaders/FireFly.shader
-
8Assets/Scenes/ImageTracking/Prefabs/FlowerAlternativePrefab.meta
-
7Assets/Scenes/ImageTracking/Prefabs/FlowerAlternativePrefab/FlowerAlternativePrefab.prefab.meta
-
306Assets/Scenes/ImageTracking/Prefabs/FlowerAlternativePrefab/FlowerAlternativePrefab.prefab
-
8Assets/Scenes/ImageTracking/Prefabs/FlowerAlternativePrefab/Models.meta
-
77Assets/Scenes/ImageTracking/Prefabs/FlowerAlternativePrefab/Models/VegetationSmall06_Mat.mat
-
10Assets/Scenes/ImageTracking/Prefabs/FlowerAlternativePrefab/Models/VegetationSmall06_Mat.mat.meta
-
8Assets/Scenes/ImageTracking/Prefabs/FlowerAlternativePrefab/Small.meta
-
1001Assets/Scenes/ImageTracking/Prefabs/FlowerAlternativePrefab/Small/VegetationSmall06.fbx
-
116Assets/Scenes/ImageTracking/Prefabs/FlowerAlternativePrefab/Small/VegetationSmall06.fbx.meta
-
8Assets/Scenes/ImageTracking/Prefabs/FlowerAlternativePrefab/Textures.meta
-
1001Assets/Scenes/ImageTracking/Prefabs/FlowerAlternativePrefab/Textures/VegetationSmall06_Albedo.tif
-
1001Assets/Scenes/ImageTracking/Prefabs/FlowerAlternativePrefab/Textures/VegetationSmall06_MetallicSmooth.tif
-
1001Assets/Scenes/ImageTracking/Prefabs/FlowerAlternativePrefab/Textures/VegetationSmall06_Normals.tif
-
1001Assets/Scenes/ImageTracking/Prefabs/FlowerAlternativePrefab/Textures/VegetationSmall06_Occlusion.tif
911
Assets/Scenes/ARFoundationMenu/Menu.unity
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
920
Assets/Scenes/Depth/DepthImages.unity
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
m_EditorVersion: 2020.1.0f1 |
|||
m_EditorVersionWithRevision: 2020.1.0f1 (2ab9c4179772) |
|||
m_EditorVersion: 2020.1.1f1 |
|||
m_EditorVersionWithRevision: 2020.1.1f1 (2285c3239188) |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!21 &2100000 |
|||
Material: |
|||
serializedVersion: 6 |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_Name: DepthGradientMaterial |
|||
m_Shader: {fileID: 4800000, guid: 1aab677bdaaa5470588b1194d3f271be, type: 3} |
|||
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 |
|||
- _MaxDistance: 8 |
|||
- _Metallic: 0 |
|||
- _MinDistance: 0 |
|||
- _Mode: 0 |
|||
- _OcclusionStrength: 1 |
|||
- _Parallax: 0.02 |
|||
- _SmoothnessTextureChannel: 0 |
|||
- _SpecularHighlights: 1 |
|||
- _SrcBlend: 1 |
|||
- _TextureRotation: 0 |
|||
- _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: 1822b099f6c09434b97c31e70184ff72 |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 0 |
|||
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_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_Name: HumanStencil |
|||
m_Shader: {fileID: 4800000, guid: 100cb03e868ab4dd78fa474037e0f92c, type: 3} |
|||
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 |
|||
- _TextureRotation: 0 |
|||
- _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: c0be8d44aefaa41a79f40f503f63619b |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 0 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: c8b7d187eded9494aacba3b5d7216b2a |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 08fd61028ccc04cc5947a5b4acc3373f |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 6a0ff8cdab804425daa8e4006b4c0d1a |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 2e816cbe1be2c41e5ad778b51588c92b |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using UnityEngine.XR.ARFoundation; |
|||
|
|||
namespace UnityEngine.XR.ARFoundation.Samples |
|||
{ |
|||
public class CameraSwapper : MonoBehaviour |
|||
{ |
|||
/// <summary>
|
|||
/// The camera manager for switching the camera direction.
|
|||
/// </summary>
|
|||
public ARCameraManager cameraManager |
|||
{ |
|||
get => m_CameraManager; |
|||
set => m_CameraManager = value; |
|||
} |
|||
|
|||
[SerializeField] |
|||
ARCameraManager m_CameraManager; |
|||
|
|||
/// <summary>
|
|||
/// On button press callback to toggle the requested camera facing direction.
|
|||
/// </summary>
|
|||
public void OnSwapCameraButtonPress() |
|||
{ |
|||
Debug.Assert(m_CameraManager != null, "camera manager cannot be null"); |
|||
CameraFacingDirection newFacingDirection; |
|||
switch (m_CameraManager.requestedFacingDirection) |
|||
{ |
|||
case CameraFacingDirection.World: |
|||
newFacingDirection = CameraFacingDirection.User; |
|||
break; |
|||
case CameraFacingDirection.User: |
|||
default: |
|||
newFacingDirection = CameraFacingDirection.World; |
|||
break; |
|||
} |
|||
|
|||
Debug.Log($"Switching ARCameraManager.requestedFacingDirection from {m_CameraManager.requestedFacingDirection} to {newFacingDirection}"); |
|||
m_CameraManager.requestedFacingDirection = newFacingDirection; |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 29bd2bf6583a54738a6b2063140ee4ab |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System; |
|||
using Unity.Collections; |
|||
using UnityEngine.UI; |
|||
using UnityEngine.XR.ARSubsystems; |
|||
using UnityEngine.XR.ARFoundation; |
|||
|
|||
namespace UnityEngine.XR.ARFoundation.Samples |
|||
{ |
|||
public class CustomConfigurationChooser : MonoBehaviour |
|||
{ |
|||
/// <summary>
|
|||
/// The configuration chooser mode. Values must match the UI dropdown.
|
|||
/// </summary>
|
|||
enum ConfigurationChooserMode |
|||
{ |
|||
Default = 0, |
|||
PreferCamera = 1, |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// The AR session on which to set the configuration chooser.
|
|||
/// </summary>
|
|||
public ARSession session |
|||
{ |
|||
get => m_Session; |
|||
set => m_Session = value; |
|||
} |
|||
|
|||
[SerializeField] |
|||
ARSession m_Session; |
|||
|
|||
/// <summary>
|
|||
/// The instantiated instance of the default configuration chooser.
|
|||
/// </summary>
|
|||
static readonly ConfigurationChooser m_DefaultConfigurationChooser = new DefaultConfigurationChooser(); |
|||
|
|||
/// <summary>
|
|||
/// The instantiated instance of the prefer camera configuration chooser.
|
|||
/// </summary>
|
|||
static readonly ConfigurationChooser m_PreferCameraConfigurationChooser = new PreferCameraConfigurationChooser(); |
|||
|
|||
/// <summary>
|
|||
/// The current configuration chooser mode.
|
|||
/// </summary>
|
|||
ConfigurationChooserMode m_ConfigurationChooserMode = ConfigurationChooserMode.Default; |
|||
|
|||
void Start() |
|||
{ |
|||
UpdateConfigurationChooser(); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Callback when the depth mode dropdown UI has a value change.
|
|||
/// </summary>
|
|||
/// <param name="dropdown">The dropdown UI that changed.</param>
|
|||
public void OnDepthModeDropdownValueChanged(Dropdown dropdown) |
|||
{ |
|||
// Update the display mode from the dropdown value.
|
|||
m_ConfigurationChooserMode = (ConfigurationChooserMode)dropdown.value; |
|||
|
|||
// Update the configuration chooser.
|
|||
UpdateConfigurationChooser(); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Update the configuration chooser based on the current mode.
|
|||
/// </summary>
|
|||
void UpdateConfigurationChooser() |
|||
{ |
|||
Debug.Assert(m_Session != null, "ARSession must be nonnull"); |
|||
Debug.Assert(m_Session.subsystem != null, "ARSession must have a subsystem"); |
|||
switch (m_ConfigurationChooserMode) |
|||
{ |
|||
case ConfigurationChooserMode.PreferCamera: |
|||
m_Session.subsystem.configurationChooser = m_PreferCameraConfigurationChooser; |
|||
break; |
|||
case ConfigurationChooserMode.Default: |
|||
default: |
|||
m_Session.subsystem.configurationChooser = m_DefaultConfigurationChooser; |
|||
break; |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// A custom implementation of a <see cref="ConfigurationChooser"/>.
|
|||
/// </summary>
|
|||
class PreferCameraConfigurationChooser : ConfigurationChooser |
|||
{ |
|||
/// <summary>
|
|||
/// Selects a configuration from the given <paramref name="descriptors"/> and <paramref name="requestedFeatures"/>.
|
|||
/// </summary>
|
|||
public override Configuration ChooseConfiguration(NativeSlice<ConfigurationDescriptor> descriptors, Feature requestedFeatures) |
|||
{ |
|||
if (descriptors.Length == 0) |
|||
{ |
|||
throw new ArgumentException("No configuration descriptors to choose from.", nameof(descriptors)); |
|||
} |
|||
|
|||
if (requestedFeatures.Intersection(Feature.AnyTrackingMode).Count() > 1) |
|||
{ |
|||
throw new ArgumentException($"Zero or one tracking mode must be requested. Requested tracking modes => {requestedFeatures.Intersection(Feature.AnyTrackingMode).ToStringList()}", nameof(requestedFeatures)); |
|||
} |
|||
|
|||
if (requestedFeatures.Intersection(Feature.AnyCamera).Count() > 1) |
|||
{ |
|||
throw new ArgumentException($"Zero or one camera mode must be requested. Requested camera modes => {requestedFeatures.Intersection(Feature.AnyCamera).ToStringList()}", nameof(requestedFeatures)); |
|||
} |
|||
|
|||
// Get the requested camera features out of the set of requested features.
|
|||
Feature requestedCameraFeatures = requestedFeatures.Intersection(Feature.AnyCamera); |
|||
|
|||
int highestFeatureWeight = -1; |
|||
int highestRank = int.MinValue; |
|||
ConfigurationDescriptor bestDescriptor = default; |
|||
foreach (var descriptor in descriptors) |
|||
{ |
|||
// Initialize the feature weight with each feature being an equal weight.
|
|||
int featureWeight = requestedFeatures.Intersection(descriptor.capabilities).Count(); |
|||
|
|||
// Increase the weight if there are matching camera features.
|
|||
if (requestedCameraFeatures.Any(descriptor.capabilities)) |
|||
{ |
|||
featureWeight += 100; |
|||
} |
|||
|
|||
// Store the descriptor with the highest feature weight.
|
|||
if ((featureWeight > highestFeatureWeight) || |
|||
(featureWeight == highestFeatureWeight && descriptor.rank > highestRank)) |
|||
{ |
|||
highestFeatureWeight = featureWeight; |
|||
highestRank = descriptor.rank; |
|||
bestDescriptor = descriptor; |
|||
} |
|||
} |
|||
|
|||
// Return the configuration with the best matching descriptor.
|
|||
return new Configuration(bestDescriptor, requestedFeatures.Intersection(bestDescriptor.capabilities)); |
|||
} |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: f1cdc0d7a6c9d42ed9fe5aff9dbe95c3 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System.Text; |
|||
using UnityEngine.UI; |
|||
using UnityEngine.XR.ARFoundation; |
|||
|
|||
namespace UnityEngine.XR.ARFoundation.Samples |
|||
{ |
|||
public class DisplayARSessionInformation : MonoBehaviour |
|||
{ |
|||
/// <summary>
|
|||
/// A string builder used for logging.
|
|||
/// </summary>
|
|||
readonly StringBuilder m_StringBuilder = new StringBuilder(); |
|||
|
|||
/// <summary>
|
|||
/// The text UI to display the logging information.
|
|||
/// </summary>
|
|||
public Text infoText |
|||
{ |
|||
get => m_InfoText; |
|||
set => m_InfoText = value; |
|||
} |
|||
|
|||
[SerializeField] |
|||
Text m_InfoText; |
|||
|
|||
/// <summary>
|
|||
/// The camera manager for logging.
|
|||
/// </summary>
|
|||
public ARCameraManager cameraManager |
|||
{ |
|||
get => m_CameraManager; |
|||
set => m_CameraManager = value; |
|||
} |
|||
|
|||
[SerializeField] |
|||
ARCameraManager m_CameraManager; |
|||
|
|||
/// <summary>
|
|||
/// The plane manager for logging.
|
|||
/// </summary>
|
|||
public ARPlaneManager planeManager |
|||
{ |
|||
get => m_PlaneManager; |
|||
set => m_PlaneManager = value; |
|||
} |
|||
|
|||
[SerializeField] |
|||
ARPlaneManager m_PlaneManager; |
|||
|
|||
/// <summary>
|
|||
/// The occlusion manager for logging.
|
|||
/// </summary>
|
|||
public AROcclusionManager occlusionManager |
|||
{ |
|||
get => m_OcclusionManager; |
|||
set => m_OcclusionManager = value; |
|||
} |
|||
|
|||
[SerializeField] |
|||
AROcclusionManager m_OcclusionManager; |
|||
|
|||
void Update() |
|||
{ |
|||
// Clear the string builder for a new log information.
|
|||
m_StringBuilder.Clear(); |
|||
|
|||
// Log the various manager states.
|
|||
BuildCameraMangerInfo(m_StringBuilder); |
|||
BuildPlaneMangerInfo(m_StringBuilder); |
|||
BuildOcclusionMangerInfo(m_StringBuilder); |
|||
|
|||
LogText(m_StringBuilder.ToString()); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Construct the camera manager information.
|
|||
/// </summary>
|
|||
void BuildCameraMangerInfo(StringBuilder stringBuilder) |
|||
{ |
|||
stringBuilder.AppendLine("ARCameraManager"); |
|||
if (m_CameraManager == null) |
|||
{ |
|||
stringBuilder.AppendLine(" <null>"); |
|||
} |
|||
else if (!m_CameraManager.enabled) |
|||
{ |
|||
stringBuilder.AppendLine(" <disabled>"); |
|||
} |
|||
else |
|||
{ |
|||
stringBuilder.AppendLine(" Facing direction:"); |
|||
stringBuilder.AppendLine($" Requested: {m_CameraManager.requestedFacingDirection}"); |
|||
stringBuilder.AppendLine($" Current: {m_CameraManager.currentFacingDirection}"); |
|||
stringBuilder.AppendLine(" Auto-focus:"); |
|||
stringBuilder.AppendLine($" Requested: {m_CameraManager.autoFocusRequested}"); |
|||
stringBuilder.AppendLine($" Current: {m_CameraManager.autoFocusEnabled}"); |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Construct the plane manager information.
|
|||
/// </summary>
|
|||
void BuildPlaneMangerInfo(StringBuilder stringBuilder) |
|||
{ |
|||
stringBuilder.AppendLine("ARPlaneManager"); |
|||
if (m_PlaneManager == null) |
|||
{ |
|||
stringBuilder.AppendLine(" <null>"); |
|||
} |
|||
else if (!m_PlaneManager.enabled) |
|||
{ |
|||
stringBuilder.AppendLine(" <disabled>"); |
|||
} |
|||
else |
|||
{ |
|||
stringBuilder.AppendLine(" Detection mode:"); |
|||
stringBuilder.AppendLine($" Requested: {m_PlaneManager.requestedDetectionMode}"); |
|||
stringBuilder.AppendLine($" Current: {m_PlaneManager.currentDetectionMode}"); |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Construct the occlusion manager information.
|
|||
/// </summary>
|
|||
void BuildOcclusionMangerInfo(StringBuilder stringBuilder) |
|||
{ |
|||
stringBuilder.AppendLine("AROcclusionManager"); |
|||
if (m_OcclusionManager == null) |
|||
{ |
|||
stringBuilder.AppendLine(" <null>"); |
|||
} |
|||
else if (!m_OcclusionManager.enabled) |
|||
{ |
|||
stringBuilder.AppendLine(" <disabled>"); |
|||
} |
|||
else |
|||
{ |
|||
stringBuilder.AppendLine(" Environment depth mode:"); |
|||
stringBuilder.AppendLine($" Requested: {m_OcclusionManager.requestedEnvironmentDepthMode}"); |
|||
stringBuilder.AppendLine($" Current: {m_OcclusionManager.currentEnvironmentDepthMode}"); |
|||
stringBuilder.AppendLine(" Human stencil mode:"); |
|||
stringBuilder.AppendLine($" Requested: {m_OcclusionManager.requestedHumanStencilMode}"); |
|||
stringBuilder.AppendLine($" Current: {m_OcclusionManager.currentHumanStencilMode}"); |
|||
stringBuilder.AppendLine(" Human depth mode:"); |
|||
stringBuilder.AppendLine($" Requested: {m_OcclusionManager.requestedHumanDepthMode}"); |
|||
stringBuilder.AppendLine($" Current: {m_OcclusionManager.currentHumanDepthMode}"); |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Log the given text to the screen if the image info UI is set. Otherwise, log the string to debug.
|
|||
/// </summary>
|
|||
/// <param name="text">The text string to log.</param>
|
|||
void LogText(string text) |
|||
{ |
|||
if (m_InfoText != null) |
|||
{ |
|||
m_InfoText.text = text; |
|||
} |
|||
else |
|||
{ |
|||
Debug.Log(text); |
|||
} |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: a8793e59c6aea4d1a91bfa0038a7e8e5 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
Shader "Unlit/DepthGradient" |
|||
{ |
|||
Properties |
|||
{ |
|||
_MainTex ("Main Texture", 2D) = "black" {} |
|||
_MinDistance ("Min Distance", Float) = 0.0 |
|||
_MaxDistance ("Max Distance", Float) = 8.0 |
|||
} |
|||
SubShader |
|||
{ |
|||
Tags |
|||
{ |
|||
"Queue" = "Geometry" |
|||
"RenderType" = "Opaque" |
|||
"ForceNoShadowCasting" = "True" |
|||
} |
|||
|
|||
Pass |
|||
{ |
|||
Cull Off |
|||
ZTest Always |
|||
ZWrite Off |
|||
Lighting Off |
|||
LOD 100 |
|||
Tags |
|||
{ |
|||
"LightMode" = "Always" |
|||
} |
|||
|
|||
|
|||
HLSLPROGRAM |
|||
|
|||
#pragma vertex vert |
|||
#pragma fragment frag |
|||
|
|||
#include "UnityCG.cginc" |
|||
|
|||
#define real half |
|||
#define real3 half3 |
|||
#define real4 half4 |
|||
#define TransformObjectToHClip UnityObjectToClipPos |
|||
|
|||
#define DECLARE_TEXTURE2D_FLOAT(texture) UNITY_DECLARE_TEX2D_FLOAT(texture) |
|||
#define DECLARE_SAMPLER_FLOAT(sampler) |
|||
#define SAMPLE_TEXTURE2D(texture,sampler,texcoord) UNITY_SAMPLE_TEX2D(texture,texcoord) |
|||
|
|||
|
|||
struct appdata |
|||
{ |
|||
float3 position : POSITION; |
|||
float2 texcoord : TEXCOORD0; |
|||
}; |
|||
|
|||
struct v2f |
|||
{ |
|||
float4 position : SV_POSITION; |
|||
float2 texcoord : TEXCOORD0; |
|||
}; |
|||
|
|||
struct fragment_output |
|||
{ |
|||
real4 color : SV_Target; |
|||
}; |
|||
|
|||
|
|||
CBUFFER_START(DisplayRotationPerFrame) |
|||
float4x4 _DisplayRotationPerFrame; |
|||
CBUFFER_END |
|||
|
|||
|
|||
v2f vert (appdata v) |
|||
{ |
|||
v2f o; |
|||
o.position = TransformObjectToHClip(v.position); |
|||
o.texcoord = mul(float3(v.texcoord, 1.0f), _DisplayRotationPerFrame).xy; |
|||
return o; |
|||
} |
|||
|
|||
|
|||
real3 HSVtoRGB(real3 arg1) |
|||
{ |
|||
real4 K = real4(1.0h, 2.0h / 3.0h, 1.0h / 3.0h, 3.0h); |
|||
real3 P = abs(frac(arg1.xxx + K.xyz) * 6.0h - K.www); |
|||
return arg1.z * lerp(K.xxx, saturate(P - K.xxx), arg1.y); |
|||
} |
|||
|
|||
|
|||
DECLARE_TEXTURE2D_FLOAT(_MainTex); |
|||
DECLARE_SAMPLER_FLOAT(sampler_MainTex); |
|||
|
|||
real _MinDistance; |
|||
real _MaxDistance; |
|||
|
|||
fragment_output frag (v2f i) |
|||
{ |
|||
// Sample the environment depth (in meters). |
|||
float envDistance = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.texcoord).r; |
|||
|
|||
real lerpFactor = (envDistance - _MinDistance) / (_MaxDistance - _MinDistance); |
|||
real hue = lerp(0.70h, -0.15h, saturate(lerpFactor)); |
|||
if (hue < 0.0h) |
|||
{ |
|||
hue += 1.0h; |
|||
} |
|||
real3 color = real3(hue, 0.9h, 0.6h); |
|||
|
|||
fragment_output o; |
|||
o.color = real4(HSVtoRGB(color), 1.0h); |
|||
return o; |
|||
} |
|||
|
|||
ENDHLSL |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 1aab677bdaaa5470588b1194d3f271be |
|||
ShaderImporter: |
|||
externalObjects: {} |
|||
defaultTextures: [] |
|||
nonModifiableTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
Shader "Unlit/HumanStencil" |
|||
{ |
|||
Properties |
|||
{ |
|||
_MainTex ("Main Texture", 2D) = "black" {} |
|||
} |
|||
SubShader |
|||
{ |
|||
Tags |
|||
{ |
|||
"Queue" = "Geometry" |
|||
"RenderType" = "Opaque" |
|||
"ForceNoShadowCasting" = "True" |
|||
} |
|||
|
|||
Pass |
|||
{ |
|||
Cull Off |
|||
ZTest Always |
|||
ZWrite Off |
|||
Lighting Off |
|||
LOD 100 |
|||
Tags |
|||
{ |
|||
"LightMode" = "Always" |
|||
} |
|||
|
|||
|
|||
HLSLPROGRAM |
|||
|
|||
#pragma vertex vert |
|||
#pragma fragment frag |
|||
|
|||
#include "UnityCG.cginc" |
|||
|
|||
#define real half |
|||
#define real3 half3 |
|||
#define real4 half4 |
|||
#define TransformObjectToHClip UnityObjectToClipPos |
|||
|
|||
#define DECLARE_TEXTURE2D_FLOAT(texture) UNITY_DECLARE_TEX2D_FLOAT(texture) |
|||
#define DECLARE_SAMPLER_FLOAT(sampler) |
|||
#define SAMPLE_TEXTURE2D(texture,sampler,texcoord) UNITY_SAMPLE_TEX2D(texture,texcoord) |
|||
|
|||
|
|||
struct appdata |
|||
{ |
|||
float3 position : POSITION; |
|||
float2 texcoord : TEXCOORD0; |
|||
}; |
|||
|
|||
struct v2f |
|||
{ |
|||
float4 position : SV_POSITION; |
|||
float2 texcoord : TEXCOORD0; |
|||
}; |
|||
|
|||
struct fragment_output |
|||
{ |
|||
real4 color : SV_Target; |
|||
}; |
|||
|
|||
|
|||
CBUFFER_START(DisplayRotationPerFrame) |
|||
float4x4 _DisplayRotationPerFrame; |
|||
CBUFFER_END |
|||
|
|||
|
|||
v2f vert (appdata v) |
|||
{ |
|||
v2f o; |
|||
o.position = TransformObjectToHClip(v.position); |
|||
o.texcoord = mul(float3(v.texcoord, 1.0f), _DisplayRotationPerFrame).xy; |
|||
return o; |
|||
} |
|||
|
|||
|
|||
DECLARE_TEXTURE2D_FLOAT(_MainTex); |
|||
DECLARE_SAMPLER_FLOAT(sampler_MainTex); |
|||
|
|||
fragment_output frag (v2f i) |
|||
{ |
|||
float stencilValue = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.texcoord).r; |
|||
|
|||
fragment_output o; |
|||
o.color = real4(stencilValue, stencilValue, stencilValue, 1.0h); |
|||
return o; |
|||
} |
|||
|
|||
ENDHLSL |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 100cb03e868ab4dd78fa474037e0f92c |
|||
ShaderImporter: |
|||
externalObjects: {} |
|||
defaultTextures: [] |
|||
nonModifiableTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 3aae069bebee946a090ed6a756a1e77b |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!850595691 &4890085278179872738 |
|||
LightingSettings: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_Name: ConfigurationChooserSettings |
|||
serializedVersion: 2 |
|||
m_GIWorkflowMode: 0 |
|||
m_EnableBakedLightmaps: 1 |
|||
m_EnableRealtimeLightmaps: 0 |
|||
m_RealtimeEnvironmentLighting: 1 |
|||
m_BounceScale: 1 |
|||
m_AlbedoBoost: 1 |
|||
m_IndirectOutputScale: 1 |
|||
m_UsingShadowmask: 1 |
|||
m_BakeBackend: 1 |
|||
m_LightmapMaxSize: 512 |
|||
m_BakeResolution: 10 |
|||
m_Padding: 2 |
|||
m_TextureCompression: 1 |
|||
m_AO: 0 |
|||
m_AOMaxDistance: 1 |
|||
m_CompAOExponent: 1 |
|||
m_CompAOExponentDirect: 0 |
|||
m_ExtractAO: 0 |
|||
m_MixedBakeMode: 2 |
|||
m_LightmapsBakeMode: 1 |
|||
m_FilterMode: 1 |
|||
m_LightmapParameters: {fileID: 0} |
|||
m_ExportTrainingData: 0 |
|||
m_TrainingDataDestination: TrainingData |
|||
m_RealtimeResolution: 2 |
|||
m_ForceWhiteAlbedo: 0 |
|||
m_ForceUpdates: 0 |
|||
m_FinalGather: 0 |
|||
m_FinalGatherRayCount: 256 |
|||
m_FinalGatherFiltering: 1 |
|||
m_PVRCulling: 1 |
|||
m_PVRSampling: 1 |
|||
m_PVRDirectSampleCount: 32 |
|||
m_PVRSampleCount: 256 |
|||
m_PVREnvironmentSampleCount: 256 |
|||
m_PVREnvironmentReferencePointCount: 2048 |
|||
m_LightProbeSampleCountMultiplier: 4 |
|||
m_PVRBounces: 2 |
|||
m_PVRRussianRouletteStartBounce: 2 |
|||
m_PVREnvironmentMIS: 0 |
|||
m_PVRFilteringMode: 2 |
|||
m_PVRDenoiserTypeDirect: 0 |
|||
m_PVRDenoiserTypeIndirect: 0 |
|||
m_PVRDenoiserTypeAO: 0 |
|||
m_PVRFilterTypeDirect: 0 |
|||
m_PVRFilterTypeIndirect: 0 |
|||
m_PVRFilterTypeAO: 0 |
|||
m_PVRFilteringGaussRadiusDirect: 1 |
|||
m_PVRFilteringGaussRadiusIndirect: 5 |
|||
m_PVRFilteringGaussRadiusAO: 2 |
|||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5 |
|||
m_PVRFilteringAtrousPositionSigmaIndirect: 2 |
|||
m_PVRFilteringAtrousPositionSigmaAO: 1 |
|
|||
fileFormatVersion: 2 |
|||
guid: 7353b45b3628640b39b11b7732d3e52f |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 0 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
Assets/Scenes/Configurations/ConfigurationChooser.unity
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
using System; |
|||
using System.Text; |
|||
using UnityEngine; |
|||
using UnityEngine.XR.ARFoundation; |
|||
using UnityEngine.XR.ARSubsystems; |
|||
|
|||
namespace UnityEngine.XR.ARFoundation.Samples |
|||
{ |
|||
/// <summary>
|
|||
/// Change the prefab for the first image in library at runtime.
|
|||
/// </summary>
|
|||
[RequireComponent(typeof(ARTrackedImageManager))] |
|||
public class DynamicPrefab : MonoBehaviour |
|||
{ |
|||
GameObject m_OriginalPrefab; |
|||
|
|||
[SerializeField] |
|||
GameObject m_AlternativePrefab; |
|||
|
|||
public GameObject alternativePrefab |
|||
{ |
|||
get => m_AlternativePrefab; |
|||
set => m_AlternativePrefab = value; |
|||
} |
|||
|
|||
enum State |
|||
{ |
|||
OriginalPrefab, |
|||
ChangeToOriginalPrefab, |
|||
AlternativePrefab, |
|||
ChangeToAlternativePrefab, |
|||
Error |
|||
} |
|||
|
|||
State m_State; |
|||
|
|||
string m_ErrorMessage = ""; |
|||
|
|||
void OnGUI() |
|||
{ |
|||
var fontSize = 50; |
|||
GUI.skin.button.fontSize = fontSize; |
|||
GUI.skin.label.fontSize = fontSize; |
|||
|
|||
float margin = 100; |
|||
|
|||
GUILayout.BeginArea(new Rect(margin, margin, Screen.width - margin * 2, Screen.height - margin * 2)); |
|||
|
|||
switch (m_State) |
|||
{ |
|||
case State.OriginalPrefab: |
|||
{ |
|||
if (GUILayout.Button($"Alternative Prefab for {GetComponent<PrefabImagePairManager>().imageLibrary[0].name}")) |
|||
{ |
|||
m_State = State.ChangeToAlternativePrefab; |
|||
} |
|||
|
|||
break; |
|||
} |
|||
case State.AlternativePrefab: |
|||
{ |
|||
if (GUILayout.Button($"Original Prefab for {GetComponent<PrefabImagePairManager>().imageLibrary[0].name}")) |
|||
{ |
|||
m_State = State.ChangeToOriginalPrefab; |
|||
} |
|||
|
|||
break; |
|||
} |
|||
case State.Error: |
|||
{ |
|||
GUILayout.Label(m_ErrorMessage); |
|||
break; |
|||
} |
|||
} |
|||
GUILayout.EndArea(); |
|||
} |
|||
|
|||
void SetError(string errorMessage) |
|||
{ |
|||
m_State = State.Error; |
|||
m_ErrorMessage = $"Error: {errorMessage}"; |
|||
} |
|||
|
|||
void Update() |
|||
{ |
|||
switch (m_State) |
|||
{ |
|||
case State.ChangeToAlternativePrefab: |
|||
{ |
|||
if (!alternativePrefab) |
|||
{ |
|||
SetError("No alternative prefab is given."); |
|||
break; |
|||
} |
|||
|
|||
var manager = GetComponent<PrefabImagePairManager>(); |
|||
if (!manager) |
|||
{ |
|||
SetError($"No {nameof(PrefabImagePairManager)} available."); |
|||
break; |
|||
} |
|||
|
|||
var library = manager.imageLibrary; |
|||
if (!library) |
|||
{ |
|||
SetError($"No image library available."); |
|||
break; |
|||
} |
|||
|
|||
if (!m_OriginalPrefab) |
|||
m_OriginalPrefab = manager.GetPrefabForReferenceImage(library[0]); |
|||
|
|||
manager.SetPrefabForReferenceImage(library[0], alternativePrefab); |
|||
m_State = State.AlternativePrefab; |
|||
break; |
|||
} |
|||
|
|||
case State.ChangeToOriginalPrefab: |
|||
{ |
|||
if (!m_OriginalPrefab) |
|||
{ |
|||
SetError("No original prefab is given."); |
|||
break; |
|||
} |
|||
|
|||
var manager = GetComponent<PrefabImagePairManager>(); |
|||
if (!manager) |
|||
{ |
|||
SetError($"No {nameof(PrefabImagePairManager)} available."); |
|||
break; |
|||
} |
|||
|
|||
var library = manager.imageLibrary; |
|||
if (!library) |
|||
{ |
|||
SetError($"No image library available."); |
|||
break; |
|||
} |
|||
|
|||
manager.SetPrefabForReferenceImage(library[0], m_OriginalPrefab); |
|||
m_State = State.OriginalPrefab; |
|||
break; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: a6d5323815f004189af1fb658b6c9369 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!29 &1 |
|||
OcclusionCullingSettings: |
|||
m_ObjectHideFlags: 0 |
|||
serializedVersion: 2 |
|||
m_OcclusionBakeSettings: |
|||
smallestOccluder: 5 |
|||
smallestHole: 0.25 |
|||
backfaceThreshold: 100 |
|||
m_SceneGUID: 00000000000000000000000000000000 |
|||
m_OcclusionCullingData: {fileID: 0} |
|||
--- !u!104 &2 |
|||
RenderSettings: |
|||
m_ObjectHideFlags: 0 |
|||
serializedVersion: 9 |
|||
m_Fog: 0 |
|||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} |
|||
m_FogMode: 3 |
|||
m_FogDensity: 0.01 |
|||
m_LinearFogStart: 0 |
|||
m_LinearFogEnd: 300 |
|||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} |
|||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} |
|||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} |
|||
m_AmbientIntensity: 1 |
|||
m_AmbientMode: 0 |
|||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} |
|||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} |
|||
m_HaloStrength: 0.5 |
|||
m_FlareStrength: 1 |
|||
m_FlareFadeSpeed: 3 |
|||
m_HaloTexture: {fileID: 0} |
|||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} |
|||
m_DefaultReflectionMode: 0 |
|||
m_DefaultReflectionResolution: 128 |
|||
m_ReflectionBounces: 1 |
|||
m_ReflectionIntensity: 1 |
|||
m_CustomReflection: {fileID: 0} |
|||
m_Sun: {fileID: 0} |
|||
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} |
|||
m_UseRadianceAmbientProbe: 0 |
|||
--- !u!157 &3 |
|||
LightmapSettings: |
|||
m_ObjectHideFlags: 0 |
|||
serializedVersion: 12 |
|||
m_GIWorkflowMode: 1 |
|||
m_GISettings: |
|||
serializedVersion: 2 |
|||
m_BounceScale: 1 |
|||
m_IndirectOutputScale: 1 |
|||
m_AlbedoBoost: 1 |
|||
m_EnvironmentLightingMode: 0 |
|||
m_EnableBakedLightmaps: 1 |
|||
m_EnableRealtimeLightmaps: 0 |
|||
m_LightmapEditorSettings: |
|||
serializedVersion: 12 |
|||
m_Resolution: 2 |
|||
m_BakeResolution: 40 |
|||
m_AtlasSize: 1024 |
|||
m_AO: 0 |
|||
m_AOMaxDistance: 1 |
|||
m_CompAOExponent: 1 |
|||
m_CompAOExponentDirect: 0 |
|||
m_ExtractAmbientOcclusion: 0 |
|||
m_Padding: 2 |
|||
m_LightmapParameters: {fileID: 0} |
|||
m_LightmapsBakeMode: 1 |
|||
m_TextureCompression: 1 |
|||
m_FinalGather: 0 |
|||
m_FinalGatherFiltering: 1 |
|||
m_FinalGatherRayCount: 256 |
|||
m_ReflectionCompression: 2 |
|||
m_MixedBakeMode: 2 |
|||
m_BakeBackend: 1 |
|||
m_PVRSampling: 1 |
|||
m_PVRDirectSampleCount: 32 |
|||
m_PVRSampleCount: 512 |
|||
m_PVRBounces: 2 |
|||
m_PVREnvironmentSampleCount: 256 |
|||
m_PVREnvironmentReferencePointCount: 2048 |
|||
m_PVRFilteringMode: 1 |
|||
m_PVRDenoiserTypeDirect: 1 |
|||
m_PVRDenoiserTypeIndirect: 1 |
|||
m_PVRDenoiserTypeAO: 1 |
|||
m_PVRFilterTypeDirect: 0 |
|||
m_PVRFilterTypeIndirect: 0 |
|||
m_PVRFilterTypeAO: 0 |
|||
m_PVREnvironmentMIS: 1 |
|||
m_PVRCulling: 1 |
|||
m_PVRFilteringGaussRadiusDirect: 1 |
|||
m_PVRFilteringGaussRadiusIndirect: 5 |
|||
m_PVRFilteringGaussRadiusAO: 2 |
|||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5 |
|||
m_PVRFilteringAtrousPositionSigmaIndirect: 2 |
|||
m_PVRFilteringAtrousPositionSigmaAO: 1 |
|||
m_ExportTrainingData: 0 |
|||
m_TrainingDataDestination: TrainingData |
|||
m_LightProbeSampleCountMultiplier: 4 |
|||
m_LightingDataAsset: {fileID: 0} |
|||
m_LightingSettings: {fileID: 0} |
|||
--- !u!196 &4 |
|||
NavMeshSettings: |
|||
serializedVersion: 2 |
|||
m_ObjectHideFlags: 0 |
|||
m_BuildSettings: |
|||
serializedVersion: 2 |
|||
agentTypeID: 0 |
|||
agentRadius: 0.5 |
|||
agentHeight: 2 |
|||
agentSlope: 45 |
|||
agentClimb: 0.4 |
|||
ledgeDropHeight: 0 |
|||
maxJumpAcrossDistance: 0 |
|||
minRegionArea: 2 |
|||
manualCellSize: 0 |
|||
cellSize: 0.16666667 |
|||
manualTileSize: 0 |
|||
tileSize: 256 |
|||
accuratePlacement: 0 |
|||
maxJobWorkers: 0 |
|||
preserveTilesOutsideBounds: 0 |
|||
debug: |
|||
m_Flags: 0 |
|||
m_NavMeshData: {fileID: 0} |
|||
--- !u!1 &264295714 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 264295719} |
|||
- component: {fileID: 264295718} |
|||
- component: {fileID: 264295717} |
|||
- component: {fileID: 264295716} |
|||
- component: {fileID: 264295715} |
|||
m_Layer: 0 |
|||
m_Name: AR Session Origin |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!114 &264295715 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 264295714} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: a6d5323815f004189af1fb658b6c9369, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_AlternativePrefab: {fileID: 8367145187887469793, guid: 3760319adcbe74905bf3e2a7dced4830, |
|||
type: 3} |
|||
--- !u!114 &264295716 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 264295714} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 467eefdf66a9b4c24b9d89f2f71b2ce9, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_PrefabsList: |
|||
- imageGuid: f0340be5-710e-49ff-bc70-45f1315b9202 |
|||
imagePrefab: {fileID: 6916502901855112170, guid: e22b43a8fcdab413bb4f52f5076f759e, |
|||
type: 3} |
|||
- imageGuid: 2c29eeed-d95c-4111-b724-80f9ff10ce86 |
|||
imagePrefab: {fileID: 2804028924010200506, guid: 379785de5e39005469c875710d3cc5a7, |
|||
type: 3} |
|||
- imageGuid: aae75228-1973-4dc0-b7a2-53d1566ee402 |
|||
imagePrefab: {fileID: 3279860958548870494, guid: 2584331523bd14e8898965d93034efdb, |
|||
type: 3} |
|||
m_ImageLibrary: {fileID: 11400000, guid: c86e375d7e7430442a1104e88fa21f21, type: 2} |
|||
--- !u!114 &264295717 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 264295714} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 4dea56a9eaadd1c439095de4f9a371cb, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_SerializedLibrary: {fileID: 11400000, guid: c86e375d7e7430442a1104e88fa21f21, |
|||
type: 2} |
|||
m_MaxNumberOfMovingImages: 4 |
|||
m_TrackedImagePrefab: {fileID: 0} |
|||
--- !u!114 &264295718 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 264295714} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 520bb47c46cf8624fafb307b7d1b862a, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_Camera: {fileID: 579846251} |
|||
--- !u!4 &264295719 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 264295714} |
|||
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: 579846255} |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 2 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
--- !u!1 &287391694 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 287391696} |
|||
- component: {fileID: 287391695} |
|||
m_Layer: 0 |
|||
m_Name: Directional Light |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!108 &287391695 |
|||
Light: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 287391694} |
|||
m_Enabled: 1 |
|||
serializedVersion: 10 |
|||
m_Type: 1 |
|||
m_Shape: 0 |
|||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} |
|||
m_Intensity: 1 |
|||
m_Range: 10 |
|||
m_SpotAngle: 30 |
|||
m_InnerSpotAngle: 21.802082 |
|||
m_CookieSize: 10 |
|||
m_Shadows: |
|||
m_Type: 2 |
|||
m_Resolution: -1 |
|||
m_CustomResolution: -1 |
|||
m_Strength: 1 |
|||
m_Bias: 0.05 |
|||
m_NormalBias: 0.4 |
|||
m_NearPlane: 0.2 |
|||
m_CullingMatrixOverride: |
|||
e00: 1 |
|||
e01: 0 |
|||
e02: 0 |
|||
e03: 0 |
|||
e10: 0 |
|||
e11: 1 |
|||
e12: 0 |
|||
e13: 0 |
|||
e20: 0 |
|||
e21: 0 |
|||
e22: 1 |
|||
e23: 0 |
|||
e30: 0 |
|||
e31: 0 |
|||
e32: 0 |
|||
e33: 1 |
|||
m_UseCullingMatrixOverride: 0 |
|||
m_Cookie: {fileID: 0} |
|||
m_DrawHalo: 0 |
|||
m_Flare: {fileID: 0} |
|||
m_RenderMode: 0 |
|||
m_CullingMask: |
|||
serializedVersion: 2 |
|||
m_Bits: 4294967295 |
|||
m_RenderingLayerMask: 1 |
|||
m_Lightmapping: 4 |
|||
m_LightShadowCasterMode: 0 |
|||
m_AreaSize: {x: 1, y: 1} |
|||
m_BounceIntensity: 1 |
|||
m_ColorTemperature: 6570 |
|||
m_UseColorTemperature: 0 |
|||
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} |
|||
m_UseBoundingSphereOverride: 0 |
|||
m_ShadowRadius: 0 |
|||
m_ShadowAngle: 0 |
|||
--- !u!4 &287391696 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 287391694} |
|||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} |
|||
m_LocalPosition: {x: 0, y: 3, z: 0} |
|||
m_LocalScale: {x: 1, y: 1, z: 1} |
|||
m_Children: [] |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 0 |
|||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} |
|||
--- !u!1 &579846250 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 579846255} |
|||
- component: {fileID: 579846251} |
|||
- component: {fileID: 579846254} |
|||
- component: {fileID: 579846253} |
|||
- component: {fileID: 579846252} |
|||
m_Layer: 0 |
|||
m_Name: AR Camera |
|||
m_TagString: MainCamera |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!20 &579846251 |
|||
Camera: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 579846250} |
|||
m_Enabled: 1 |
|||
serializedVersion: 2 |
|||
m_ClearFlags: 2 |
|||
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 1} |
|||
m_projectionMatrixMode: 1 |
|||
m_GateFitMode: 2 |
|||
m_FOVAxisMode: 0 |
|||
m_SensorSize: {x: 36, y: 24} |
|||
m_LensShift: {x: 0, y: 0} |
|||
m_FocalLength: 50 |
|||
m_NormalizedViewPortRect: |
|||
serializedVersion: 2 |
|||
x: 0 |
|||
y: 0 |
|||
width: 1 |
|||
height: 1 |
|||
near clip plane: 0.1 |
|||
far clip plane: 20 |
|||
field of view: 60 |
|||
orthographic: 0 |
|||
orthographic size: 5 |
|||
m_Depth: 0 |
|||
m_CullingMask: |
|||
serializedVersion: 2 |
|||
m_Bits: 4294967295 |
|||
m_RenderingPath: -1 |
|||
m_TargetTexture: {fileID: 0} |
|||
m_TargetDisplay: 0 |
|||
m_TargetEye: 3 |
|||
m_HDR: 1 |
|||
m_AllowMSAA: 1 |
|||
m_AllowDynamicResolution: 0 |
|||
m_ForceIntoRT: 0 |
|||
m_OcclusionCulling: 1 |
|||
m_StereoConvergence: 10 |
|||
m_StereoSeparation: 0.022 |
|||
--- !u!114 &579846252 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 579846250} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 816b289ef451e094f9ae174fb4cf8db0, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_UseCustomMaterial: 0 |
|||
m_CustomMaterial: {fileID: 0} |
|||
--- !u!114 &579846253 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 579846250} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 4966719baa26e4b0e8231a24d9bd491a, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_FocusMode: -1 |
|||
m_LightEstimationMode: -1 |
|||
m_AutoFocus: 1 |
|||
m_LightEstimation: 0 |
|||
m_FacingDirection: 1 |
|||
--- !u!114 &579846254 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 579846250} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 6e3c44306fb1e439a9f18b2212b8ab70, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
--- !u!4 &579846255 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 579846250} |
|||
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: 264295719} |
|||
m_RootOrder: 0 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
--- !u!1 &732175967 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 732175970} |
|||
- component: {fileID: 732175969} |
|||
- component: {fileID: 732175968} |
|||
m_Layer: 0 |
|||
m_Name: AR Session |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!114 &732175968 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 732175967} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: fa850fbd5b8aded44846f96e35f1a9f5, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
--- !u!114 &732175969 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 732175967} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 3859a92a05d4f5d418cb6ca605290e74, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_AttemptUpdate: 1 |
|||
m_MatchFrameRate: 1 |
|||
m_TrackingMode: 2 |
|||
--- !u!4 &732175970 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 732175967} |
|||
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: 1 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
--- !u!1 &1291259208 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 1291259211} |
|||
- component: {fileID: 1291259210} |
|||
- component: {fileID: 1291259209} |
|||
m_Layer: 0 |
|||
m_Name: EventSystem |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!114 &1291259209 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1291259208} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_HorizontalAxis: Horizontal |
|||
m_VerticalAxis: Vertical |
|||
m_SubmitButton: Submit |
|||
m_CancelButton: Cancel |
|||
m_InputActionsPerSecond: 10 |
|||
m_RepeatDelay: 0.5 |
|||
m_ForceModuleActive: 0 |
|||
--- !u!114 &1291259210 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1291259208} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_FirstSelected: {fileID: 0} |
|||
m_sendNavigationEvents: 1 |
|||
m_DragThreshold: 10 |
|||
--- !u!4 &1291259211 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1291259208} |
|||
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: 3 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
--- !u!1 &1809621586 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 1809621590} |
|||
- component: {fileID: 1809621589} |
|||
- component: {fileID: 1809621588} |
|||
- component: {fileID: 1809621587} |
|||
m_Layer: 5 |
|||
m_Name: Canvas |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!114 &1809621587 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1809621586} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_IgnoreReversedGraphics: 1 |
|||
m_BlockingObjects: 0 |
|||
m_BlockingMask: |
|||
serializedVersion: 2 |
|||
m_Bits: 4294967295 |
|||
--- !u!114 &1809621588 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1809621586} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_UiScaleMode: 0 |
|||
m_ReferencePixelsPerUnit: 100 |
|||
m_ScaleFactor: 1 |
|||
m_ReferenceResolution: {x: 800, y: 600} |
|||
m_ScreenMatchMode: 0 |
|||
m_MatchWidthOrHeight: 0 |
|||
m_PhysicalUnit: 3 |
|||
m_FallbackScreenDPI: 96 |
|||
m_DefaultSpriteDPI: 96 |
|||
m_DynamicPixelsPerUnit: 1 |
|||
--- !u!223 &1809621589 |
|||
Canvas: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1809621586} |
|||
m_Enabled: 1 |
|||
serializedVersion: 3 |
|||
m_RenderMode: 0 |
|||
m_Camera: {fileID: 0} |
|||
m_PlaneDistance: 100 |
|||
m_PixelPerfect: 0 |
|||
m_ReceivesEvents: 1 |
|||
m_OverrideSorting: 0 |
|||
m_OverridePixelPerfect: 0 |
|||
m_SortingBucketNormalizedSize: 0 |
|||
m_AdditionalShaderChannelsFlag: 0 |
|||
m_SortingLayerID: 0 |
|||
m_SortingOrder: 0 |
|||
m_TargetDisplay: 0 |
|||
--- !u!224 &1809621590 |
|||
RectTransform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1809621586} |
|||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
|||
m_LocalPosition: {x: 0, y: 0, z: 0} |
|||
m_LocalScale: {x: 0, y: 0, z: 0} |
|||
m_Children: |
|||
- {fileID: 2085117585} |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 4 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
m_AnchorMin: {x: 0, y: 0} |
|||
m_AnchorMax: {x: 0, y: 0} |
|||
m_AnchoredPosition: {x: 0, y: 0} |
|||
m_SizeDelta: {x: 0, y: 0} |
|||
m_Pivot: {x: 0, y: 0} |
|||
--- !u!1001 &2085117584 |
|||
PrefabInstance: |
|||
m_ObjectHideFlags: 0 |
|||
serializedVersion: 2 |
|||
m_Modification: |
|||
m_TransformParent: {fileID: 1809621590} |
|||
m_Modifications: |
|||
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_LocalPosition.x |
|||
value: 0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_LocalPosition.y |
|||
value: 0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_LocalPosition.z |
|||
value: 0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_LocalRotation.x |
|||
value: -0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_LocalRotation.y |
|||
value: -0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_LocalRotation.z |
|||
value: -0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_LocalRotation.w |
|||
value: 1 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_RootOrder |
|||
value: 0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_LocalEulerAnglesHint.x |
|||
value: 0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_LocalEulerAnglesHint.y |
|||
value: 0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_LocalEulerAnglesHint.z |
|||
value: 0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_AnchoredPosition.x |
|||
value: 0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_AnchoredPosition.y |
|||
value: 0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_SizeDelta.x |
|||
value: 100 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_SizeDelta.y |
|||
value: 100 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_AnchorMin.x |
|||
value: 0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_AnchorMin.y |
|||
value: 0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_AnchorMax.x |
|||
value: 0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_AnchorMax.y |
|||
value: 0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_Pivot.x |
|||
value: 0.5 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_Pivot.y |
|||
value: 0.5 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 3225625820226493293, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_Name |
|||
value: BackButtonManager |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 3475649454728415072, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_AnchoredPosition.x |
|||
value: 150 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 3475649454728415072, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_AnchoredPosition.y |
|||
value: 150 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 3475649454728415072, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_AnchorMin.x |
|||
value: 0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 3475649454728415072, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_AnchorMin.y |
|||
value: 0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 3475649454728415072, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_AnchorMax.x |
|||
value: 0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 3475649454728415072, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_AnchorMax.y |
|||
value: 0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 3475649454728415073, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_IsActive |
|||
value: 0 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 4584729703009679669, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: faceMenu |
|||
value: 1 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 4584729703009679669, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_BackButton |
|||
value: |
|||
objectReference: {fileID: 2085117586} |
|||
- target: {fileID: 4792654351133402651, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_AnchoredPosition.x |
|||
value: 50 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 4792654351133402651, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_AnchoredPosition.y |
|||
value: 50 |
|||
objectReference: {fileID: 0} |
|||
- target: {fileID: 6193553896759373505, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
propertyPath: m_IsActive |
|||
value: 0 |
|||
objectReference: {fileID: 0} |
|||
m_RemovedComponents: [] |
|||
m_SourcePrefab: {fileID: 100100000, guid: 4ee22c1f54b174122b6a766fe09e0de8, type: 3} |
|||
--- !u!224 &2085117585 stripped |
|||
RectTransform: |
|||
m_CorrespondingSourceObject: {fileID: 2304810881573073946, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
m_PrefabInstance: {fileID: 2085117584} |
|||
m_PrefabAsset: {fileID: 0} |
|||
--- !u!1 &2085117586 stripped |
|||
GameObject: |
|||
m_CorrespondingSourceObject: {fileID: 6193553896759373505, guid: 4ee22c1f54b174122b6a766fe09e0de8, |
|||
type: 3} |
|||
m_PrefabInstance: {fileID: 2085117584} |
|||
m_PrefabAsset: {fileID: 0} |
|
|||
fileFormatVersion: 2 |
|||
guid: a1bf0e7b9cece455f81c1d2731ba76e7 |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 467eefdf66a9b4c24b9d89f2f71b2ce9 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
#if UNITY_EDITOR
|
|||
using UnityEditor; |
|||
#endif
|
|||
using UnityEngine; |
|||
using UnityEngine.UI; |
|||
using UnityEngine.XR.ARSubsystems; |
|||
using UnityEngine.XR.ARFoundation; |
|||
|
|||
namespace UnityEngine.XR.ARFoundation.Samples |
|||
{ |
|||
/// <summary>
|
|||
/// This component listens for images detected by the <c>XRImageTrackingSubsystem</c>
|
|||
/// and overlays some prefabs on top of the detected image.
|
|||
/// </summary>
|
|||
[RequireComponent(typeof(ARTrackedImageManager))] |
|||
public class PrefabImagePairManager : MonoBehaviour, ISerializationCallbackReceiver |
|||
{ |
|||
/// <summary>
|
|||
/// Used to associate an `XRReferenceImage` with a Prefab by using the `XRReferenceImage`'s guid as a unique identifier for a particular reference image.
|
|||
/// </summary>
|
|||
[Serializable] |
|||
struct NamedPrefab |
|||
{ |
|||
// System.Guid isn't serializable, so we store the Guid as a string. At runtime, this is converted back to a System.Guid
|
|||
public string imageGuid; |
|||
public GameObject imagePrefab; |
|||
|
|||
public NamedPrefab(Guid guid, GameObject prefab) |
|||
{ |
|||
imageGuid = guid.ToString(); |
|||
imagePrefab = prefab; |
|||
} |
|||
} |
|||
|
|||
[SerializeField] |
|||
[HideInInspector] |
|||
List<NamedPrefab> m_PrefabsList = new List<NamedPrefab>(); |
|||
|
|||
Dictionary<Guid, GameObject> m_PrefabsDictionary = new Dictionary<Guid, GameObject>(); |
|||
Dictionary<Guid, GameObject> m_Instantiated = new Dictionary<Guid, GameObject>(); |
|||
ARTrackedImageManager m_TrackedImageManager; |
|||
|
|||
[SerializeField] |
|||
[Tooltip("Reference Image Library")] |
|||
XRReferenceImageLibrary m_ImageLibrary; |
|||
|
|||
/// <summary>
|
|||
/// Get the <c>XRReferenceImageLibrary</c>
|
|||
/// </summary>
|
|||
public XRReferenceImageLibrary imageLibrary |
|||
{ |
|||
get => m_ImageLibrary; |
|||
set => m_ImageLibrary = value; |
|||
} |
|||
|
|||
public void OnBeforeSerialize() |
|||
{ |
|||
m_PrefabsList.Clear(); |
|||
foreach (var kvp in m_PrefabsDictionary) |
|||
{ |
|||
m_PrefabsList.Add(new NamedPrefab(kvp.Key, kvp.Value)); |
|||
} |
|||
} |
|||
|
|||
public void OnAfterDeserialize() |
|||
{ |
|||
m_PrefabsDictionary = new Dictionary<Guid, GameObject>(); |
|||
foreach (var entry in m_PrefabsList) |
|||
{ |
|||
m_PrefabsDictionary.Add(Guid.Parse(entry.imageGuid), entry.imagePrefab); |
|||
} |
|||
} |
|||
|
|||
void Awake() |
|||
{ |
|||
m_TrackedImageManager = GetComponent<ARTrackedImageManager>(); |
|||
} |
|||
|
|||
void OnEnable() |
|||
{ |
|||
m_TrackedImageManager.trackedImagesChanged += OnTrackedImagesChanged; |
|||
} |
|||
|
|||
void OnDisable() |
|||
{ |
|||
m_TrackedImageManager.trackedImagesChanged -= OnTrackedImagesChanged; |
|||
} |
|||
|
|||
void OnTrackedImagesChanged(ARTrackedImagesChangedEventArgs eventArgs) |
|||
{ |
|||
foreach (var trackedImage in eventArgs.added) |
|||
{ |
|||
// Give the initial image a reasonable default scale
|
|||
var minLocalScalar = Mathf.Min(trackedImage.size.x, trackedImage.size.y) / 2; |
|||
trackedImage.transform.localScale = new Vector3(minLocalScalar, minLocalScalar, minLocalScalar); |
|||
AssignPrefab(trackedImage); |
|||
} |
|||
} |
|||
|
|||
void AssignPrefab(ARTrackedImage trackedImage) |
|||
{ |
|||
if (m_PrefabsDictionary.TryGetValue(trackedImage.referenceImage.guid, out var prefab)) |
|||
m_Instantiated[trackedImage.referenceImage.guid] = Instantiate(prefab, trackedImage.transform); |
|||
} |
|||
|
|||
public GameObject GetPrefabForReferenceImage(XRReferenceImage referenceImage) |
|||
=> m_PrefabsDictionary.TryGetValue(referenceImage.guid, out var prefab) ? prefab : null; |
|||
|
|||
public void SetPrefabForReferenceImage(XRReferenceImage referenceImage, GameObject alternativePrefab) |
|||
{ |
|||
m_PrefabsDictionary[referenceImage.guid] = alternativePrefab; |
|||
if (m_Instantiated.TryGetValue(referenceImage.guid, out var instantiatedPrefab)) |
|||
{ |
|||
m_Instantiated[referenceImage.guid] = Instantiate(alternativePrefab, instantiatedPrefab.transform.parent); |
|||
Destroy(instantiatedPrefab); |
|||
} |
|||
} |
|||
|
|||
#if UNITY_EDITOR
|
|||
/// <summary>
|
|||
/// This customizes the inspector component and updates the prefab list when
|
|||
/// the reference image library is changed.
|
|||
/// </summary>
|
|||
[CustomEditor(typeof(PrefabImagePairManager))] |
|||
class PrefabImagePairManagerInspector : Editor |
|||
{ |
|||
List<XRReferenceImage> m_ReferenceImages = new List<XRReferenceImage>(); |
|||
bool m_IsExpanded = true; |
|||
|
|||
bool HasLibraryChanged(XRReferenceImageLibrary library) |
|||
{ |
|||
if (library == null) |
|||
return m_ReferenceImages.Count == 0; |
|||
|
|||
if (m_ReferenceImages.Count != library.count) |
|||
return true; |
|||
|
|||
for (int i = 0; i < library.count; i++) |
|||
{ |
|||
if (m_ReferenceImages[i] != library[i]) |
|||
return true; |
|||
} |
|||
|
|||
return false; |
|||
} |
|||
|
|||
public override void OnInspectorGUI() |
|||
{ |
|||
//customized inspector
|
|||
var behaviour = serializedObject.targetObject as PrefabImagePairManager; |
|||
|
|||
serializedObject.Update(); |
|||
using (new EditorGUI.DisabledScope(true)) |
|||
{ |
|||
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_Script")); |
|||
} |
|||
|
|||
var libraryProperty = serializedObject.FindProperty(nameof(m_ImageLibrary)); |
|||
EditorGUILayout.PropertyField(libraryProperty); |
|||
var library = libraryProperty.objectReferenceValue as XRReferenceImageLibrary; |
|||
|
|||
//check library changes
|
|||
if (HasLibraryChanged(library)) |
|||
{ |
|||
if (library) |
|||
{ |
|||
var tempDictionary = new Dictionary<Guid, GameObject>(); |
|||
foreach (var referenceImage in library) |
|||
{ |
|||
tempDictionary.Add(referenceImage.guid, behaviour.GetPrefabForReferenceImage(referenceImage)); |
|||
} |
|||
behaviour.m_PrefabsDictionary = tempDictionary; |
|||
} |
|||
} |
|||
|
|||
// update current
|
|||
m_ReferenceImages.Clear(); |
|||
if (library) |
|||
{ |
|||
foreach (var referenceImage in library) |
|||
{ |
|||
m_ReferenceImages.Add(referenceImage); |
|||
} |
|||
} |
|||
|
|||
//show prefab list
|
|||
m_IsExpanded = EditorGUILayout.Foldout(m_IsExpanded, "Prefab List"); |
|||
if (m_IsExpanded) |
|||
{ |
|||
using (new EditorGUI.IndentLevelScope()) |
|||
{ |
|||
EditorGUI.BeginChangeCheck(); |
|||
|
|||
var tempDictionary = new Dictionary<Guid, GameObject>(); |
|||
foreach (var image in library) |
|||
{ |
|||
var prefab = (GameObject) EditorGUILayout.ObjectField(image.name, behaviour.m_PrefabsDictionary[image.guid], typeof(GameObject), false); |
|||
tempDictionary.Add(image.guid, prefab); |
|||
} |
|||
|
|||
if (EditorGUI.EndChangeCheck()) |
|||
{ |
|||
Undo.RecordObject(target, "Update Prefab"); |
|||
behaviour.m_PrefabsDictionary = tempDictionary; |
|||
EditorUtility.SetDirty(target); |
|||
} |
|||
} |
|||
} |
|||
|
|||
serializedObject.ApplyModifiedProperties(); |
|||
} |
|||
} |
|||
#endif
|
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 500a6a776451041a4b230916f16d353a |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/FireFliesPrefab.prefab
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: 379785de5e39005469c875710d3cc5a7 |
|||
PrefabImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/Magic Spell - Sleeping spell 1.wav
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: adcac75087a17704ca6c0c3b15bc3aa5 |
|||
timeCreated: 1570803018 |
|||
licenseType: Store |
|||
AudioImporter: |
|||
serializedVersion: 6 |
|||
defaultSettings: |
|||
loadType: 0 |
|||
sampleRateSetting: 0 |
|||
sampleRateOverride: 44100 |
|||
compressionFormat: 1 |
|||
quality: 1 |
|||
conversionMode: 0 |
|||
platformSettingOverrides: {} |
|||
forceToMono: 0 |
|||
normalize: 1 |
|||
preloadAudioData: 1 |
|||
loadInBackground: 0 |
|||
ambisonic: 0 |
|||
3D: 1 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 718d2af9d13e843f692ed13226f091b7 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
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: FireFly |
|||
m_Shader: {fileID: 4800000, guid: dc9ad51526a07884ab0982f5273e9b5d, type: 3} |
|||
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} |
|||
- _Emission: |
|||
m_Texture: {fileID: 2800000, guid: f16b4e9769a932a4ba18f3ae2964e3e9, type: 3} |
|||
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: 22f3fc6e1558b7a45ad656281e20285a, 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} |
|||
- _Normal: |
|||
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} |
|||
- _Wings: |
|||
m_Texture: {fileID: 2800000, guid: b4106b3c439d6634ba6878ffd5fb1761, type: 3} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
m_Floats: |
|||
- _BumpScale: 1 |
|||
- _Cutoff: 0.5 |
|||
- _DetailNormalMapScale: 1 |
|||
- _DstBlend: 0 |
|||
- _EmissiveAmount: 4 |
|||
- _GlossMapScale: 1 |
|||
- _Glossiness: 0.5 |
|||
- _GlossyReflections: 1 |
|||
- _Metallic: 0 |
|||
- _Mode: 0 |
|||
- _OcclusionStrength: 1 |
|||
- _Parallax: 0.02 |
|||
- _SmoothnessTextureChannel: 0 |
|||
- _Specular: 0 |
|||
- _SpecularHighlights: 1 |
|||
- _SrcBlend: 1 |
|||
- _UVSec: 0 |
|||
- _WingGloss: 0.683 |
|||
- _WingSpecular: 0.318 |
|||
- _ZWrite: 1 |
|||
m_Colors: |
|||
- _Color: {r: 1, g: 1, b: 1, a: 1} |
|||
- _EmissionColor: {r: 32, g: 32, b: 32, a: 1} |
|
|||
fileFormatVersion: 2 |
|||
guid: 5471faebdbcc34e47baecfecda463063 |
|||
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: FireFlyTrail |
|||
m_Shader: {fileID: 211, guid: 0000000000000000f000000000000000, type: 0} |
|||
m_ShaderKeywords: _ALPHABLEND_ON _FADING_ON |
|||
m_LightmapFlags: 0 |
|||
m_EnableInstancingVariants: 0 |
|||
m_DoubleSidedGI: 0 |
|||
m_CustomRenderQueue: 3000 |
|||
stringTagMap: |
|||
RenderType: Transparent |
|||
disabledShaderPasses: |
|||
- ALWAYS |
|||
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: c07de05b9bda8f6409252857c36d7ed0, 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: |
|||
- _BlendOp: 0 |
|||
- _BumpScale: 1 |
|||
- _CameraFadingEnabled: 0 |
|||
- _CameraFarFadeDistance: 2 |
|||
- _CameraNearFadeDistance: 1 |
|||
- _ColorMode: 0 |
|||
- _Cull: 2 |
|||
- _Cutoff: 0.5 |
|||
- _DetailNormalMapScale: 1 |
|||
- _DistortionBlend: 0.5 |
|||
- _DistortionEnabled: 0 |
|||
- _DistortionStrength: 1 |
|||
- _DistortionStrengthScaled: 0 |
|||
- _DstBlend: 1 |
|||
- _EmissionEnabled: 0 |
|||
- _FlipbookMode: 0 |
|||
- _GlossMapScale: 1 |
|||
- _Glossiness: 0.5 |
|||
- _GlossyReflections: 1 |
|||
- _LightingEnabled: 0 |
|||
- _Metallic: 0 |
|||
- _Mode: 4 |
|||
- _OcclusionStrength: 1 |
|||
- _Parallax: 0.02 |
|||
- _SmoothnessTextureChannel: 0 |
|||
- _SoftParticlesEnabled: 1 |
|||
- _SoftParticlesFarFadeDistance: 1 |
|||
- _SoftParticlesNearFadeDistance: 0 |
|||
- _SpecularHighlights: 1 |
|||
- _SrcBlend: 5 |
|||
- _UVSec: 0 |
|||
- _ZWrite: 0 |
|||
m_Colors: |
|||
- _CameraFadeParams: {r: 0, g: Infinity, b: 0, a: 0} |
|||
- _Color: {r: 2.828427, g: 2.828427, b: 2.828427, a: 1} |
|||
- _ColorAddSubDiff: {r: 1, g: 0, b: 0, a: 0} |
|||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} |
|||
- _SoftParticleFadeParams: {r: 0, g: 1, b: 0, a: 0} |
|
|||
fileFormatVersion: 2 |
|||
guid: 1d11412570f90ba4caf1b0b6dea27152 |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 2100000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 91a84d6c0fb4d4339bf72887be8b941e |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
75
Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/Models/FireFly.fbx
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: dc6b02b1d8deafa448e0985c40c217ae |
|||
ModelImporter: |
|||
serializedVersion: 23 |
|||
fileIDToRecycleName: |
|||
100000: //RootNode |
|||
400000: //RootNode |
|||
2100000: Firefly_Mat |
|||
2300000: //RootNode |
|||
3300000: //RootNode |
|||
4300000: FireFly |
|||
externalObjects: {} |
|||
materials: |
|||
importMaterials: 0 |
|||
materialName: 0 |
|||
materialSearch: 1 |
|||
materialLocation: 1 |
|||
animations: |
|||
legacyGenerateAnimations: 4 |
|||
bakeSimulation: 0 |
|||
resampleCurves: 1 |
|||
optimizeGameObjects: 0 |
|||
motionNodeName: |
|||
rigImportErrors: |
|||
rigImportWarnings: |
|||
animationImportErrors: |
|||
animationImportWarnings: |
|||
animationRetargetingWarnings: |
|||
animationDoRetargetingWarnings: 0 |
|||
importAnimatedCustomProperties: 0 |
|||
importConstraints: 0 |
|||
animationCompression: 1 |
|||
animationRotationError: 0.5 |
|||
animationPositionError: 0.5 |
|||
animationScaleError: 0.5 |
|||
animationWrapMode: 0 |
|||
extraExposedTransformPaths: [] |
|||
extraUserProperties: [] |
|||
clipAnimations: [] |
|||
isReadable: 1 |
|||
meshes: |
|||
lODScreenPercentages: [] |
|||
globalScale: 1 |
|||
meshCompression: 0 |
|||
addColliders: 0 |
|||
importVisibility: 0 |
|||
importBlendShapes: 1 |
|||
importCameras: 0 |
|||
importLights: 0 |
|||
swapUVChannels: 0 |
|||
generateSecondaryUV: 0 |
|||
useFileUnits: 1 |
|||
optimizeMeshForGPU: 1 |
|||
keepQuads: 0 |
|||
weldVertices: 1 |
|||
preserveHierarchy: 0 |
|||
indexFormat: 0 |
|||
secondaryUVAngleDistortion: 8 |
|||
secondaryUVAreaDistortion: 15.000001 |
|||
secondaryUVHardAngle: 88 |
|||
secondaryUVPackMargin: 4 |
|||
useFileScale: 1 |
|||
previousCalculatedGlobalScale: 1 |
|||
hasPreviousCalculatedGlobalScale: 0 |
|||
tangentSpace: |
|||
normalSmoothAngle: 60 |
|||
normalImportMode: 0 |
|||
tangentImportMode: 3 |
|||
normalCalculationMode: 4 |
|||
importAnimation: 0 |
|||
copyAvatar: 0 |
|||
humanDescription: |
|||
serializedVersion: 2 |
|||
human: [] |
|||
skeleton: [] |
|||
armTwist: 0.5 |
|||
foreArmTwist: 0.5 |
|||
upperLegTwist: 0.5 |
|||
legTwist: 0.5 |
|||
armStretch: 0.05 |
|||
legStretch: 0.05 |
|||
feetSpacing: 0 |
|||
rootMotionBoneName: |
|||
rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} |
|||
hasTranslationDoF: 0 |
|||
hasExtraRoot: 0 |
|||
skeletonHasParents: 1 |
|||
lastHumanDescriptionAvatarSource: {instanceID: 0} |
|||
animationType: 0 |
|||
humanoidOversampling: 1 |
|||
additionalBone: 0 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 247a4ebb07d5c464ab60d55dfb15c402 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/Prefabs/FireFliesPrefab.prefab
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: 6dab247f9a9f8473abcb6a37d3468724 |
|||
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: 1000011210275196} |
|||
m_IsPrefabAsset: 1 |
|||
--- !u!1 &1000011210275196 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 4000010154436032} |
|||
- component: {fileID: 108000013609061350} |
|||
m_Layer: 0 |
|||
m_Name: ParticlesLight |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!4 &4000010154436032 |
|||
Transform: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1000011210275196} |
|||
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} |
|||
m_LocalPosition: {x: -20.52, y: 1.84, z: 9.490326} |
|||
m_LocalScale: {x: 1, y: 1, z: 1} |
|||
m_Children: [] |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 0 |
|||
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} |
|||
--- !u!108 &108000013609061350 |
|||
Light: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 100100000} |
|||
m_GameObject: {fileID: 1000011210275196} |
|||
m_Enabled: 1 |
|||
serializedVersion: 8 |
|||
m_Type: 2 |
|||
m_Color: {r: 1, g: 1, b: 1, a: 1} |
|||
m_Intensity: 1 |
|||
m_Range: 10 |
|||
m_SpotAngle: 30 |
|||
m_CookieSize: 10 |
|||
m_Shadows: |
|||
m_Type: 0 |
|||
m_Resolution: -1 |
|||
m_CustomResolution: -1 |
|||
m_Strength: 1 |
|||
m_Bias: 0.05 |
|||
m_NormalBias: 0.4 |
|||
m_NearPlane: 0.2 |
|||
m_Cookie: {fileID: 0} |
|||
m_DrawHalo: 0 |
|||
m_Flare: {fileID: 0} |
|||
m_RenderMode: 0 |
|||
m_CullingMask: |
|||
serializedVersion: 2 |
|||
m_Bits: 4294967295 |
|||
m_Lightmapping: 2 |
|||
m_LightShadowCasterMode: 0 |
|||
m_AreaSize: {x: 1, y: 1} |
|||
m_BounceIntensity: 1 |
|||
m_ColorTemperature: 6570 |
|||
m_UseColorTemperature: 0 |
|||
m_ShadowRadius: 0 |
|||
m_ShadowAngle: 0 |
|
|||
fileFormatVersion: 2 |
|||
guid: 61a6b3a108030e54ba372fe7097916d0 |
|||
timeCreated: 1472572134 |
|||
licenseType: Store |
|||
NativeFormatImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 2b719189ef3894861990da159de36210 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: ff6cd15537fe6457b8fa6ae6a7adc9ed |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/Textures/FireFlyAlbedo.tif
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: 22f3fc6e1558b7a45ad656281e20285a |
|||
TextureImporter: |
|||
fileIDToRecycleName: {} |
|||
externalObjects: {} |
|||
serializedVersion: 6 |
|||
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: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
Assets/Scenes/ImageTracking/Prefabs/FireFliesPrefab/Textures/FireFlyEmission.tif
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: f16b4e9769a932a4ba18f3ae2964e3e9 |
|||
TextureImporter: |
|||
fileIDToRecycleName: {} |
|||
externalObjects: {} |
|||
serializedVersion: 6 |
|||
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: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: b4106b3c439d6634ba6878ffd5fb1761 |
|||
TextureImporter: |
|||
fileIDToRecycleName: {} |
|||
externalObjects: {} |
|||
serializedVersion: 6 |
|||
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: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: c07de05b9bda8f6409252857c36d7ed0 |
|||
TextureImporter: |
|||
fileIDToRecycleName: {} |
|||
externalObjects: {} |
|||
serializedVersion: 6 |
|||
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: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: dc9ad51526a07884ab0982f5273e9b5d |
|||
ShaderImporter: |
|||
externalObjects: {} |
|||
defaultTextures: [] |
|||
nonModifiableTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
Shader "Unlit/FireFlyNew" |
|||
{ |
|||
Properties |
|||
{ |
|||
_MainTex ("Albedo (Emissive)", 2D) = "white" {} |
|||
_Wings ("Wings", 2D) = "white" {} |
|||
_EmissiveAmount ("_EmissiveAmount", Float) =2.0 |
|||
} |
|||
SubShader |
|||
{ |
|||
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } |
|||
LOD 100 |
|||
|
|||
Pass |
|||
{ |
|||
CGPROGRAM |
|||
#pragma vertex vert alpha:fade |
|||
#pragma fragment frag |
|||
|
|||
#include "UnityCG.cginc" |
|||
|
|||
struct appdata |
|||
{ |
|||
float4 vertex : POSITION; |
|||
float4 uv : TEXCOORD0; |
|||
float4 color : COLOR; |
|||
}; |
|||
|
|||
struct v2f |
|||
{ |
|||
float4 uv : TEXCOORD0; |
|||
float4 vertex : SV_POSITION; |
|||
float4 color : COLOR; |
|||
}; |
|||
|
|||
sampler2D _MainTex; |
|||
float _EmissiveAmount; |
|||
|
|||
v2f vert (appdata v) |
|||
{ |
|||
v2f o; |
|||
o.vertex = UnityObjectToClipPos(v.vertex); |
|||
o.uv = v.uv; |
|||
o.color.rgba = v.color.rgba; |
|||
return o; |
|||
} |
|||
|
|||
fixed4 frag (v2f i) : SV_Target |
|||
{ |
|||
fixed4 col = tex2D(_MainTex, i.uv); |
|||
|
|||
float4 emissive = i.color * col.a; |
|||
|
|||
clip(i.color.a - 0.5); |
|||
|
|||
col += emissive * pow(_EmissiveAmount, 2.2); |
|||
return col; |
|||
} |
|||
ENDCG |
|||
} |
|||
|
|||
Pass |
|||
{ |
|||
Cull Off |
|||
Blend SrcAlpha OneMinusSrcAlpha |
|||
|
|||
CGPROGRAM |
|||
|
|||
#pragma vertex vert |
|||
#pragma fragment frag |
|||
|
|||
#include "UnityCG.cginc" |
|||
|
|||
struct appdata |
|||
{ |
|||
float4 vertex : POSITION; |
|||
float4 uv : TEXCOORD0; |
|||
float4 color : COLOR; |
|||
}; |
|||
|
|||
struct v2f |
|||
{ |
|||
float4 uv : TEXCOORD0; |
|||
float4 vertex : SV_POSITION; |
|||
float4 color : COLOR; |
|||
}; |
|||
|
|||
sampler2D _Wings; |
|||
|
|||
v2f vert (appdata v) |
|||
{ |
|||
v2f o; |
|||
o.vertex = UnityObjectToClipPos(v.vertex); |
|||
o.uv = v.uv; |
|||
o.color.rgba = v.color.rgba; |
|||
return o; |
|||
} |
|||
|
|||
fixed4 frag (v2f i) : SV_Target |
|||
{ |
|||
fixed4 wings = tex2D(_Wings, i.uv.zw); |
|||
wings.a = lerp( wings.a, 0, i.color.a); |
|||
|
|||
return wings; |
|||
} |
|||
ENDCG |
|||
|
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: bbe30caa66b294fd3add96765a04060c |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 3760319adcbe74905bf3e2a7dced4830 |
|||
PrefabImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!1 &8367145187887469793 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 8367145187887106241} |
|||
- component: {fileID: 8367145187903773793} |
|||
m_Layer: 0 |
|||
m_Name: FlowerAlternativePrefab |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!4 &8367145187887106241 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 8367145187887469793} |
|||
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: 8367145187887106243} |
|||
- {fileID: 8367145187887106245} |
|||
- {fileID: 8367145187887106247} |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 0 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
--- !u!205 &8367145187903773793 |
|||
LODGroup: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 8367145187887469793} |
|||
serializedVersion: 2 |
|||
m_LocalReferencePoint: {x: 0.20911652, y: 0.8288138, z: -0.113377094} |
|||
m_Size: 1.9034579 |
|||
m_FadeMode: 0 |
|||
m_AnimateCrossFading: 0 |
|||
m_LastLODIsBillboard: 0 |
|||
m_LODs: |
|||
- screenRelativeHeight: 0.25 |
|||
fadeTransitionWidth: 0 |
|||
renderers: |
|||
- renderer: {fileID: 8367145187885206051} |
|||
- screenRelativeHeight: 0.125 |
|||
fadeTransitionWidth: 0 |
|||
renderers: |
|||
- renderer: {fileID: 8367145187885206053} |
|||
- screenRelativeHeight: 0.01 |
|||
fadeTransitionWidth: 0 |
|||
renderers: |
|||
- renderer: {fileID: 8367145187885206055} |
|||
m_Enabled: 1 |
|||
--- !u!1 &8367145187887469795 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 8367145187887106243} |
|||
- component: {fileID: 8367145187886303459} |
|||
- component: {fileID: 8367145187885206051} |
|||
m_Layer: 0 |
|||
m_Name: VegetationSmall06_LOD00 |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!4 &8367145187887106243 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 8367145187887469795} |
|||
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: 8367145187887106241} |
|||
m_RootOrder: 0 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
--- !u!33 &8367145187886303459 |
|||
MeshFilter: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 8367145187887469795} |
|||
m_Mesh: {fileID: 4300000, guid: 95a59a779c708744f9268e68ea353e42, type: 3} |
|||
--- !u!23 &8367145187885206051 |
|||
MeshRenderer: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 8367145187887469795} |
|||
m_Enabled: 1 |
|||
m_CastShadows: 1 |
|||
m_ReceiveShadows: 1 |
|||
m_DynamicOccludee: 1 |
|||
m_MotionVectors: 1 |
|||
m_LightProbeUsage: 1 |
|||
m_ReflectionProbeUsage: 1 |
|||
m_RayTracingMode: 2 |
|||
m_RayTraceProcedural: 0 |
|||
m_RenderingLayerMask: 1 |
|||
m_RendererPriority: 0 |
|||
m_Materials: |
|||
- {fileID: 2100000, guid: 5405f4473c846ef408c58df310ad92d3, type: 2} |
|||
m_StaticBatchInfo: |
|||
firstSubMesh: 0 |
|||
subMeshCount: 0 |
|||
m_StaticBatchRoot: {fileID: 0} |
|||
m_ProbeAnchor: {fileID: 0} |
|||
m_LightProbeVolumeOverride: {fileID: 0} |
|||
m_ScaleInLightmap: 1 |
|||
m_ReceiveGI: 1 |
|||
m_PreserveUVs: 0 |
|||
m_IgnoreNormalsForChartDetection: 0 |
|||
m_ImportantGI: 0 |
|||
m_StitchLightmapSeams: 1 |
|||
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 |
|||
m_AdditionalVertexStreams: {fileID: 0} |
|||
--- !u!1 &8367145187887469797 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 8367145187887106245} |
|||
- component: {fileID: 8367145187886303461} |
|||
- component: {fileID: 8367145187885206053} |
|||
m_Layer: 0 |
|||
m_Name: VegetationSmall06_LOD01 |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!4 &8367145187887106245 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 8367145187887469797} |
|||
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: 8367145187887106241} |
|||
m_RootOrder: 1 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
--- !u!33 &8367145187886303461 |
|||
MeshFilter: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 8367145187887469797} |
|||
m_Mesh: {fileID: 4300002, guid: 95a59a779c708744f9268e68ea353e42, type: 3} |
|||
--- !u!23 &8367145187885206053 |
|||
MeshRenderer: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 8367145187887469797} |
|||
m_Enabled: 1 |
|||
m_CastShadows: 1 |
|||
m_ReceiveShadows: 1 |
|||
m_DynamicOccludee: 1 |
|||
m_MotionVectors: 1 |
|||
m_LightProbeUsage: 1 |
|||
m_ReflectionProbeUsage: 1 |
|||
m_RayTracingMode: 2 |
|||
m_RayTraceProcedural: 0 |
|||
m_RenderingLayerMask: 1 |
|||
m_RendererPriority: 0 |
|||
m_Materials: |
|||
- {fileID: 2100000, guid: 5405f4473c846ef408c58df310ad92d3, type: 2} |
|||
m_StaticBatchInfo: |
|||
firstSubMesh: 0 |
|||
subMeshCount: 0 |
|||
m_StaticBatchRoot: {fileID: 0} |
|||
m_ProbeAnchor: {fileID: 0} |
|||
m_LightProbeVolumeOverride: {fileID: 0} |
|||
m_ScaleInLightmap: 1 |
|||
m_ReceiveGI: 1 |
|||
m_PreserveUVs: 0 |
|||
m_IgnoreNormalsForChartDetection: 0 |
|||
m_ImportantGI: 0 |
|||
m_StitchLightmapSeams: 1 |
|||
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 |
|||
m_AdditionalVertexStreams: {fileID: 0} |
|||
--- !u!1 &8367145187887469799 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 8367145187887106247} |
|||
- component: {fileID: 8367145187886303463} |
|||
- component: {fileID: 8367145187885206055} |
|||
m_Layer: 0 |
|||
m_Name: VegetationSmall06_LOD02 |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!4 &8367145187887106247 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 8367145187887469799} |
|||
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: 8367145187887106241} |
|||
m_RootOrder: 2 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
--- !u!33 &8367145187886303463 |
|||
MeshFilter: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 8367145187887469799} |
|||
m_Mesh: {fileID: 4300004, guid: 95a59a779c708744f9268e68ea353e42, type: 3} |
|||
--- !u!23 &8367145187885206055 |
|||
MeshRenderer: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 8367145187887469799} |
|||
m_Enabled: 1 |
|||
m_CastShadows: 1 |
|||
m_ReceiveShadows: 1 |
|||
m_DynamicOccludee: 1 |
|||
m_MotionVectors: 1 |
|||
m_LightProbeUsage: 1 |
|||
m_ReflectionProbeUsage: 1 |
|||
m_RayTracingMode: 2 |
|||
m_RayTraceProcedural: 0 |
|||
m_RenderingLayerMask: 1 |
|||
m_RendererPriority: 0 |
|||
m_Materials: |
|||
- {fileID: 2100000, guid: 5405f4473c846ef408c58df310ad92d3, type: 2} |
|||
m_StaticBatchInfo: |
|||
firstSubMesh: 0 |
|||
subMeshCount: 0 |
|||
m_StaticBatchRoot: {fileID: 0} |
|||
m_ProbeAnchor: {fileID: 0} |
|||
m_LightProbeVolumeOverride: {fileID: 0} |
|||
m_ScaleInLightmap: 1 |
|||
m_ReceiveGI: 1 |
|||
m_PreserveUVs: 0 |
|||
m_IgnoreNormalsForChartDetection: 0 |
|||
m_ImportantGI: 0 |
|||
m_StitchLightmapSeams: 1 |
|||
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 |
|||
m_AdditionalVertexStreams: {fileID: 0} |
|
|||
fileFormatVersion: 2 |
|||
guid: 73e637fe5ec2f4335a7343aaa8a4dde8 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
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: VegetationSmall06_Mat |
|||
m_Shader: {fileID: 4800000, guid: e48dc3fe7602c914abada8cec9711f48, type: 3} |
|||
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: 042fd21c3a319e94aba6934e497ebd87, 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: ced08b0b569a5b84798a26e8885bdbd0, type: 3} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _MetallicGlossMap: |
|||
m_Texture: {fileID: 2800000, guid: 0b782076c24c3be4eb8bd46356025c6e, type: 3} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _OcclusionMap: |
|||
m_Texture: {fileID: 2800000, guid: 5efc7088e25410843baa71c6d9ac3479, type: 3} |
|||
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: 1 |
|||
- _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: 0} |
|||
- _EmissiveColor: {r: 0, g: 0, b: 0, a: 0} |
|
|||
fileFormatVersion: 2 |
|||
guid: 5405f4473c846ef408c58df310ad92d3 |
|||
timeCreated: 1505726863 |
|||
licenseType: Store |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 2100000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 4a3ba04a8697846059fee09772df7610 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
Assets/Scenes/ImageTracking/Prefabs/FlowerAlternativePrefab/Small/VegetationSmall06.fbx
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: 95a59a779c708744f9268e68ea353e42 |
|||
ModelImporter: |
|||
serializedVersion: 22 |
|||
fileIDToRecycleName: |
|||
100000: //RootNode |
|||
100002: VegetationSmall06_LOD00 |
|||
100004: VegetationSmall06_LOD01 |
|||
100006: VegetationSmall06_LOD02 |
|||
400000: //RootNode |
|||
400002: VegetationSmall06_LOD00 |
|||
400004: VegetationSmall06_LOD01 |
|||
400006: VegetationSmall06_LOD02 |
|||
2100000: VegetationSmall06_Mat |
|||
2300000: //RootNode |
|||
2300002: VegetationSmall06_LOD00 |
|||
2300004: VegetationSmall06_LOD01 |
|||
2300006: VegetationSmall06_LOD02 |
|||
3300000: //RootNode |
|||
3300002: VegetationSmall06_LOD00 |
|||
3300004: VegetationSmall06_LOD01 |
|||
3300006: VegetationSmall06_LOD02 |
|||
4300000: VegetationSmall06_LOD00 |
|||
4300002: VegetationSmall06_LOD01 |
|||
4300004: VegetationSmall06_LOD02 |
|||
9500000: //RootNode |
|||
20500000: //RootNode |
|||
externalObjects: |
|||
- first: |
|||
type: UnityEngine:Material |
|||
assembly: UnityEngine.CoreModule |
|||
name: VegetationSmall06_Mat |
|||
second: {fileID: 2100000, guid: 5405f4473c846ef408c58df310ad92d3, type: 2} |
|||
materials: |
|||
importMaterials: 1 |
|||
materialName: 1 |
|||
materialSearch: 2 |
|||
materialLocation: 0 |
|||
animations: |
|||
legacyGenerateAnimations: 4 |
|||
bakeSimulation: 0 |
|||
resampleCurves: 1 |
|||
optimizeGameObjects: 0 |
|||
motionNodeName: |
|||
rigImportErrors: |
|||
rigImportWarnings: |
|||
animationImportErrors: |
|||
animationImportWarnings: |
|||
animationRetargetingWarnings: |
|||
animationDoRetargetingWarnings: 0 |
|||
importAnimatedCustomProperties: 0 |
|||
importConstraints: 0 |
|||
animationCompression: 1 |
|||
animationRotationError: 0.5 |
|||
animationPositionError: 0.5 |
|||
animationScaleError: 0.5 |
|||
animationWrapMode: 0 |
|||
extraExposedTransformPaths: [] |
|||
extraUserProperties: [] |
|||
clipAnimations: [] |
|||
isReadable: 1 |
|||
meshes: |
|||
lODScreenPercentages: |
|||
- 0.25 |
|||
- 0.125 |
|||
- 0.01 |
|||
globalScale: 1 |
|||
meshCompression: 0 |
|||
addColliders: 0 |
|||
importVisibility: 1 |
|||
importBlendShapes: 1 |
|||
importCameras: 1 |
|||
importLights: 1 |
|||
swapUVChannels: 0 |
|||
generateSecondaryUV: 0 |
|||
useFileUnits: 1 |
|||
optimizeMeshForGPU: 1 |
|||
keepQuads: 0 |
|||
weldVertices: 1 |
|||
preserveHierarchy: 0 |
|||
indexFormat: 0 |
|||
secondaryUVAngleDistortion: 8 |
|||
secondaryUVAreaDistortion: 15.000001 |
|||
secondaryUVHardAngle: 88 |
|||
secondaryUVPackMargin: 4 |
|||
useFileScale: 1 |
|||
tangentSpace: |
|||
normalSmoothAngle: 60 |
|||
normalImportMode: 0 |
|||
tangentImportMode: 3 |
|||
normalCalculationMode: 4 |
|||
importAnimation: 0 |
|||
copyAvatar: 0 |
|||
humanDescription: |
|||
serializedVersion: 2 |
|||
human: [] |
|||
skeleton: [] |
|||
armTwist: 0.5 |
|||
foreArmTwist: 0.5 |
|||
upperLegTwist: 0.5 |
|||
legTwist: 0.5 |
|||
armStretch: 0.05 |
|||
legStretch: 0.05 |
|||
feetSpacing: 0 |
|||
rootMotionBoneName: |
|||
rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} |
|||
hasTranslationDoF: 0 |
|||
hasExtraRoot: 1 |
|||
skeletonHasParents: 1 |
|||
lastHumanDescriptionAvatarSource: {instanceID: 0} |
|||
animationType: 0 |
|||
humanoidOversampling: 1 |
|||
additionalBone: 0 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 9d888140535da471fb293a28732391c1 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
Assets/Scenes/ImageTracking/Prefabs/FlowerAlternativePrefab/Textures/VegetationSmall06_Albedo.tif
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
1001
Assets/Scenes/ImageTracking/Prefabs/FlowerAlternativePrefab/Textures/VegetationSmall06_MetallicSmooth.tif
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
1001
Assets/Scenes/ImageTracking/Prefabs/FlowerAlternativePrefab/Textures/VegetationSmall06_Normals.tif
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
1001
Assets/Scenes/ImageTracking/Prefabs/FlowerAlternativePrefab/Textures/VegetationSmall06_Occlusion.tif
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
部分文件因为文件数量过多而无法显示
撰写
预览
正在加载...
取消
保存
Reference in new issue