forked from cgvr/DeltaVR
Compare commits
2 Commits
d2ac917db3
...
1cd97e4d0a
| Author | SHA1 | Date | |
|---|---|---|---|
| 1cd97e4d0a | |||
| 3097c404ba |
@@ -147,7 +147,7 @@ public class ArcheryRange : NetworkBehaviour
|
|||||||
{
|
{
|
||||||
// spawn generated model
|
// spawn generated model
|
||||||
targetObject = Instantiate(modelGenerationController.GeneratedModel, randomPos, Quaternion.identity, null);
|
targetObject = Instantiate(modelGenerationController.GeneratedModel, randomPos, Quaternion.identity, null);
|
||||||
InitializeArcherytargetObject(targetObject);
|
InitializeArcheryTargetObject(targetObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
ArcheryTarget target = targetObject.GetComponent<ArcheryTarget>();
|
ArcheryTarget target = targetObject.GetComponent<ArcheryTarget>();
|
||||||
@@ -157,7 +157,7 @@ public class ArcheryRange : NetworkBehaviour
|
|||||||
return target;
|
return target;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitializeArcherytargetObject(GameObject targetObject)
|
private void InitializeArcheryTargetObject(GameObject targetObject)
|
||||||
{
|
{
|
||||||
ArcheryTarget archeryTarget = targetObject.AddComponent<ArcheryTarget>();
|
ArcheryTarget archeryTarget = targetObject.AddComponent<ArcheryTarget>();
|
||||||
archeryTarget.pointsText = archeryTargetPointsText;
|
archeryTarget.pointsText = archeryTargetPointsText;
|
||||||
|
|||||||
138
Assets/_PROJECT/Materials/LaserBlack.mat
Normal file
138
Assets/_PROJECT/Materials/LaserBlack.mat
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &-2509310519420828263
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
version: 7
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 8
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: LaserBlack
|
||||||
|
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||||
|
m_Parent: {fileID: 0}
|
||||||
|
m_ModifiedSerializedProperties: 0
|
||||||
|
m_ValidKeywords:
|
||||||
|
- _ALPHAPREMULTIPLY_ON
|
||||||
|
- _EMISSION
|
||||||
|
- _SURFACE_TYPE_TRANSPARENT
|
||||||
|
m_InvalidKeywords: []
|
||||||
|
m_LightmapFlags: 1
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: 3000
|
||||||
|
stringTagMap:
|
||||||
|
RenderType: Transparent
|
||||||
|
disabledShaderPasses:
|
||||||
|
- DepthOnly
|
||||||
|
- SHADOWCASTER
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _BumpMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailAlbedoMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailMask:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailNormalMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _EmissionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MainTex:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MetallicGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _OcclusionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _ParallaxMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 10
|
||||||
|
- _DstBlendAlpha: 10
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _GlossMapScale: 0
|
||||||
|
- _Glossiness: 0
|
||||||
|
- _GlossyReflections: 0
|
||||||
|
- _Metallic: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.005
|
||||||
|
- _QueueOffset: 0
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Smoothness: 0.5
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 1
|
||||||
|
- _WorkflowMode: 1
|
||||||
|
- _ZWrite: 0
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 0, g: 0, b: 0, a: 0.44705883}
|
||||||
|
- _Color: {r: 0, g: 0, b: 0, a: 0.44705883}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
8
Assets/_PROJECT/Materials/LaserBlack.mat.meta
Normal file
8
Assets/_PROJECT/Materials/LaserBlack.mat.meta
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 991fa2870324ba04aba7bec9e1168afa
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
138
Assets/_PROJECT/Materials/LaserGreen.mat
Normal file
138
Assets/_PROJECT/Materials/LaserGreen.mat
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &-2509310519420828263
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
version: 7
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 8
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: LaserGreen
|
||||||
|
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||||
|
m_Parent: {fileID: 0}
|
||||||
|
m_ModifiedSerializedProperties: 0
|
||||||
|
m_ValidKeywords:
|
||||||
|
- _ALPHAPREMULTIPLY_ON
|
||||||
|
- _EMISSION
|
||||||
|
- _SURFACE_TYPE_TRANSPARENT
|
||||||
|
m_InvalidKeywords: []
|
||||||
|
m_LightmapFlags: 1
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: 3000
|
||||||
|
stringTagMap:
|
||||||
|
RenderType: Transparent
|
||||||
|
disabledShaderPasses:
|
||||||
|
- DepthOnly
|
||||||
|
- SHADOWCASTER
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _BumpMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailAlbedoMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailMask:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailNormalMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _EmissionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MainTex:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MetallicGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _OcclusionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _ParallaxMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 10
|
||||||
|
- _DstBlendAlpha: 10
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _GlossMapScale: 0
|
||||||
|
- _Glossiness: 0
|
||||||
|
- _GlossyReflections: 0
|
||||||
|
- _Metallic: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.005
|
||||||
|
- _QueueOffset: 0
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Smoothness: 0.5
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 1
|
||||||
|
- _WorkflowMode: 1
|
||||||
|
- _ZWrite: 0
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 0.30713266, g: 1, b: 0, a: 0.21176471}
|
||||||
|
- _Color: {r: 0.30713263, g: 1, b: 0, a: 0.21176471}
|
||||||
|
- _EmissionColor: {r: 0.073280446, g: 0.25953898, b: 0.0012242433, a: 1}
|
||||||
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
8
Assets/_PROJECT/Materials/LaserGreen.mat.meta
Normal file
8
Assets/_PROJECT/Materials/LaserGreen.mat.meta
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: dccb608b252977047bd5848d6a497bfb
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
138
Assets/_PROJECT/Materials/LaserRed.mat
Normal file
138
Assets/_PROJECT/Materials/LaserRed.mat
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &-2509310519420828263
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
version: 7
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 8
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: LaserRed
|
||||||
|
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||||
|
m_Parent: {fileID: 0}
|
||||||
|
m_ModifiedSerializedProperties: 0
|
||||||
|
m_ValidKeywords:
|
||||||
|
- _ALPHAPREMULTIPLY_ON
|
||||||
|
- _EMISSION
|
||||||
|
- _SURFACE_TYPE_TRANSPARENT
|
||||||
|
m_InvalidKeywords: []
|
||||||
|
m_LightmapFlags: 1
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: 3000
|
||||||
|
stringTagMap:
|
||||||
|
RenderType: Transparent
|
||||||
|
disabledShaderPasses:
|
||||||
|
- DepthOnly
|
||||||
|
- SHADOWCASTER
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _BumpMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailAlbedoMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailMask:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailNormalMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _EmissionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MainTex:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MetallicGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _OcclusionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _ParallaxMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 10
|
||||||
|
- _DstBlendAlpha: 10
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _GlossMapScale: 0
|
||||||
|
- _Glossiness: 0
|
||||||
|
- _GlossyReflections: 0
|
||||||
|
- _Metallic: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.005
|
||||||
|
- _QueueOffset: 0
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Smoothness: 0.5
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 1
|
||||||
|
- _WorkflowMode: 1
|
||||||
|
- _ZWrite: 0
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 1, g: 0.084452756, b: 0, a: 0.21960784}
|
||||||
|
- _Color: {r: 1, g: 0.084452726, b: 0, a: 0.21960784}
|
||||||
|
- _EmissionColor: {r: 0.13397168, g: 0.007051141, b: 0, a: 1}
|
||||||
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
8
Assets/_PROJECT/Materials/LaserRed.mat.meta
Normal file
8
Assets/_PROJECT/Materials/LaserRed.mat.meta
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c0707507abffb6149b19e60299403e82
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
138
Assets/_PROJECT/Materials/LaserWhite.mat
Normal file
138
Assets/_PROJECT/Materials/LaserWhite.mat
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &-2509310519420828263
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
version: 7
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 8
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: LaserWhite
|
||||||
|
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||||
|
m_Parent: {fileID: 0}
|
||||||
|
m_ModifiedSerializedProperties: 0
|
||||||
|
m_ValidKeywords:
|
||||||
|
- _ALPHAPREMULTIPLY_ON
|
||||||
|
- _EMISSION
|
||||||
|
- _SURFACE_TYPE_TRANSPARENT
|
||||||
|
m_InvalidKeywords: []
|
||||||
|
m_LightmapFlags: 1
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: 3000
|
||||||
|
stringTagMap:
|
||||||
|
RenderType: Transparent
|
||||||
|
disabledShaderPasses:
|
||||||
|
- DepthOnly
|
||||||
|
- SHADOWCASTER
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _BumpMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailAlbedoMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailMask:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailNormalMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _EmissionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MainTex:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MetallicGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _OcclusionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _ParallaxMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 10
|
||||||
|
- _DstBlendAlpha: 10
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _GlossMapScale: 0
|
||||||
|
- _Glossiness: 0
|
||||||
|
- _GlossyReflections: 0
|
||||||
|
- _Metallic: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.005
|
||||||
|
- _QueueOffset: 0
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Smoothness: 0.5
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 1
|
||||||
|
- _WorkflowMode: 1
|
||||||
|
- _ZWrite: 0
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 1, g: 1, b: 1, a: 0.21176471}
|
||||||
|
- _Color: {r: 1, g: 1, b: 1, a: 0.21176471}
|
||||||
|
- _EmissionColor: {r: 0.16493848, g: 0.16493848, b: 0.16493848, a: 1}
|
||||||
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
8
Assets/_PROJECT/Materials/LaserWhite.mat.meta
Normal file
8
Assets/_PROJECT/Materials/LaserWhite.mat.meta
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c7aad7ea05b9332478242744c9de52b9
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -62,7 +62,7 @@ MeshRenderer:
|
|||||||
m_RenderingLayerMask: 1
|
m_RenderingLayerMask: 1
|
||||||
m_RendererPriority: 0
|
m_RendererPriority: 0
|
||||||
m_Materials:
|
m_Materials:
|
||||||
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
|
- {fileID: 2100000, guid: a8775aa86c058ce4986d3749a7d0c86e, type: 2}
|
||||||
m_StaticBatchInfo:
|
m_StaticBatchInfo:
|
||||||
firstSubMesh: 0
|
firstSubMesh: 0
|
||||||
subMeshCount: 0
|
subMeshCount: 0
|
||||||
@@ -308,7 +308,7 @@ MeshRenderer:
|
|||||||
m_RenderingLayerMask: 1
|
m_RenderingLayerMask: 1
|
||||||
m_RendererPriority: 0
|
m_RendererPriority: 0
|
||||||
m_Materials:
|
m_Materials:
|
||||||
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
|
- {fileID: 2100000, guid: a8775aa86c058ce4986d3749a7d0c86e, type: 2}
|
||||||
m_StaticBatchInfo:
|
m_StaticBatchInfo:
|
||||||
firstSubMesh: 0
|
firstSubMesh: 0
|
||||||
subMeshCount: 0
|
subMeshCount: 0
|
||||||
@@ -530,6 +530,8 @@ GameObject:
|
|||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 8294461198356057691}
|
- component: {fileID: 8294461198356057691}
|
||||||
- component: {fileID: 1587203061162103481}
|
- component: {fileID: 1587203061162103481}
|
||||||
|
- component: {fileID: 6146655625910388013}
|
||||||
|
- component: {fileID: 4552742491559429175}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: ShapeScanner
|
m_Name: ShapeScanner
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@@ -554,7 +556,7 @@ Transform:
|
|||||||
- {fileID: 4362133469817120903}
|
- {fileID: 4362133469817120903}
|
||||||
- {fileID: 5335160954898573969}
|
- {fileID: 5335160954898573969}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 0
|
m_RootOrder: -1
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!114 &1587203061162103481
|
--- !u!114 &1587203061162103481
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
@@ -580,13 +582,175 @@ MonoBehaviour:
|
|||||||
raySpawnCorner1: {fileID: 4055409281532582849}
|
raySpawnCorner1: {fileID: 4055409281532582849}
|
||||||
raySpawnCorner2: {fileID: 8025195334996356355}
|
raySpawnCorner2: {fileID: 8025195334996356355}
|
||||||
rayParent: {fileID: 4362133469817120903}
|
rayParent: {fileID: 4362133469817120903}
|
||||||
requiredAndActive: {fileID: 2100000, guid: 95c7bd9309dee8c48b2bbd3bb4a95059, type: 2}
|
requiredAndActive: {fileID: 2100000, guid: dccb608b252977047bd5848d6a497bfb, type: 2}
|
||||||
requiredAndPassive: {fileID: 2100000, guid: 81be1405703cf554b9b1306f8acbd096, type: 2}
|
requiredAndPassive: {fileID: 2100000, guid: c0707507abffb6149b19e60299403e82, type: 2}
|
||||||
notRequiredAndActive: {fileID: 2100000, guid: 92a601d1f219bf4459a1dd55001debd8,
|
notRequiredAndActive: {fileID: 2100000, guid: c7aad7ea05b9332478242744c9de52b9,
|
||||||
|
type: 2}
|
||||||
|
notRequiredAndPassive: {fileID: 2100000, guid: 991fa2870324ba04aba7bec9e1168afa,
|
||||||
type: 2}
|
type: 2}
|
||||||
notRequiredAndPassive: {fileID: 7922251121040759823, guid: 44f3430c585c6514985b591c28e05a78,
|
|
||||||
type: 3}
|
|
||||||
displayText: {fileID: 7443612957244256760}
|
displayText: {fileID: 7443612957244256760}
|
||||||
|
--- !u!54 &6146655625910388013
|
||||||
|
Rigidbody:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6798688590405535079}
|
||||||
|
serializedVersion: 4
|
||||||
|
m_Mass: 1
|
||||||
|
m_Drag: 0
|
||||||
|
m_AngularDrag: 0.05
|
||||||
|
m_CenterOfMass: {x: 0, y: 0, z: 0}
|
||||||
|
m_InertiaTensor: {x: 1, y: 1, z: 1}
|
||||||
|
m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ImplicitCom: 1
|
||||||
|
m_ImplicitTensor: 1
|
||||||
|
m_UseGravity: 1
|
||||||
|
m_IsKinematic: 0
|
||||||
|
m_Interpolate: 0
|
||||||
|
m_Constraints: 0
|
||||||
|
m_CollisionDetection: 0
|
||||||
|
--- !u!114 &4552742491559429175
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6798688590405535079}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 0ad34abafad169848a38072baa96cdb2, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_InteractionManager: {fileID: 0}
|
||||||
|
m_Colliders: []
|
||||||
|
m_InteractionLayerMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_InteractionLayers:
|
||||||
|
m_Bits: 1
|
||||||
|
m_DistanceCalculationMode: 1
|
||||||
|
m_SelectMode: 0
|
||||||
|
m_CustomReticle: {fileID: 0}
|
||||||
|
m_AllowGazeInteraction: 0
|
||||||
|
m_AllowGazeSelect: 0
|
||||||
|
m_OverrideGazeTimeToSelect: 0
|
||||||
|
m_GazeTimeToSelect: 0.5
|
||||||
|
m_OverrideTimeToAutoDeselectGaze: 0
|
||||||
|
m_TimeToAutoDeselectGaze: 3
|
||||||
|
m_AllowGazeAssistance: 0
|
||||||
|
m_FirstHoverEntered:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_LastHoverExited:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_HoverEntered:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_HoverExited:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_FirstSelectEntered:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_LastSelectExited:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_SelectEntered:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_SelectExited:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_Activated:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_Deactivated:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_StartingHoverFilters: []
|
||||||
|
m_StartingSelectFilters: []
|
||||||
|
m_StartingInteractionStrengthFilters: []
|
||||||
|
m_OnFirstHoverEntered:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_OnLastHoverExited:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_OnHoverEntered:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_OnHoverExited:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_OnSelectEntered:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_OnSelectExited:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_OnSelectCanceled:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_OnActivate:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_OnDeactivate:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_AttachTransform: {fileID: 0}
|
||||||
|
m_SecondaryAttachTransform: {fileID: 0}
|
||||||
|
m_UseDynamicAttach: 0
|
||||||
|
m_MatchAttachPosition: 1
|
||||||
|
m_MatchAttachRotation: 1
|
||||||
|
m_SnapToColliderVolume: 1
|
||||||
|
m_ReinitializeDynamicAttachEverySingleGrab: 1
|
||||||
|
m_AttachEaseInTime: 0.15
|
||||||
|
m_MovementType: 2
|
||||||
|
m_VelocityDamping: 1
|
||||||
|
m_VelocityScale: 1
|
||||||
|
m_AngularVelocityDamping: 1
|
||||||
|
m_AngularVelocityScale: 1
|
||||||
|
m_TrackPosition: 1
|
||||||
|
m_SmoothPosition: 1
|
||||||
|
m_SmoothPositionAmount: 5
|
||||||
|
m_TightenPosition: 0.5
|
||||||
|
m_TrackRotation: 1
|
||||||
|
m_SmoothRotation: 1
|
||||||
|
m_SmoothRotationAmount: 5
|
||||||
|
m_TightenRotation: 0.5
|
||||||
|
m_ThrowOnDetach: 1
|
||||||
|
m_ThrowSmoothingDuration: 0.25
|
||||||
|
m_ThrowSmoothingCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 1
|
||||||
|
value: 1
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0
|
||||||
|
outWeight: 0
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
m_ThrowVelocityScale: 1.5
|
||||||
|
m_ThrowAngularVelocityScale: 1
|
||||||
|
m_ForceGravityOnDetach: 0
|
||||||
|
m_RetainTransformParent: 1
|
||||||
|
m_AttachPointCompatibilityMode: 0
|
||||||
|
m_StartingSingleGrabTransformers: []
|
||||||
|
m_StartingMultipleGrabTransformers: []
|
||||||
|
m_AddDefaultGrabTransformers: 1
|
||||||
--- !u!1 &8844992431392597936
|
--- !u!1 &8844992431392597936
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
Binary file not shown.
@@ -8,7 +8,6 @@ public class ArcheryRangeModelGenerationController : MonoBehaviour
|
|||||||
public PushableButton imageGenerationButton;
|
public PushableButton imageGenerationButton;
|
||||||
public PushableButton modelGenerationButton;
|
public PushableButton modelGenerationButton;
|
||||||
|
|
||||||
public string imageGenerationPromptSuffix = ", single object, front and side fully visible, realistic style, plain neutral background, clear details, soft studio lighting, true-to-scale";
|
|
||||||
public Texture2D GeneratedTexture { get; private set; }
|
public Texture2D GeneratedTexture { get; private set; }
|
||||||
public Image imageDisplay;
|
public Image imageDisplay;
|
||||||
|
|
||||||
@@ -42,12 +41,9 @@ public class ArcheryRangeModelGenerationController : MonoBehaviour
|
|||||||
private async void InvokeImageGeneration()
|
private async void InvokeImageGeneration()
|
||||||
{
|
{
|
||||||
string inputPrompt = microphoneStand.GetTextOutput();
|
string inputPrompt = microphoneStand.GetTextOutput();
|
||||||
string refinedPrompt = inputPrompt + imageGenerationPromptSuffix;
|
byte[] imageBytes = await InvokeAiClient.Instance.GenerateImage(inputPrompt);
|
||||||
|
GeneratedTexture = ModelGenerationUtils.CreateTexture(imageBytes);
|
||||||
|
Sprite sprite = ModelGenerationUtils.CreateSprite(GeneratedTexture);
|
||||||
byte[] imageBytes = await InvokeAiClient.Instance.GenerateImage(refinedPrompt);
|
|
||||||
GeneratedTexture = CreateTexture(imageBytes);
|
|
||||||
Sprite sprite = CreateSprite(GeneratedTexture);
|
|
||||||
imageDisplay.sprite = sprite;
|
imageDisplay.sprite = sprite;
|
||||||
|
|
||||||
imageGenerationButton.Deactivate();
|
imageGenerationButton.Deactivate();
|
||||||
@@ -63,7 +59,7 @@ public class ArcheryRangeModelGenerationController : MonoBehaviour
|
|||||||
string encodedTexture = Convert.ToBase64String(GeneratedTexture.EncodeToJPG());
|
string encodedTexture = Convert.ToBase64String(GeneratedTexture.EncodeToJPG());
|
||||||
byte[] encodedModel = await TrellisClient.Instance.GenerateModel(encodedTexture);
|
byte[] encodedModel = await TrellisClient.Instance.GenerateModel(encodedTexture);
|
||||||
|
|
||||||
GameObject spawnedObject = await PipelineManager.Instance.SpawnModel(encodedModel);
|
GameObject spawnedObject = await ModelGenerationUtils.Instance.SpawnModel(encodedModel);
|
||||||
// Destroy previous generated object
|
// Destroy previous generated object
|
||||||
Destroy(GeneratedModel);
|
Destroy(GeneratedModel);
|
||||||
spawnedObject.transform.parent = modelDisplay;
|
spawnedObject.transform.parent = modelDisplay;
|
||||||
@@ -75,34 +71,6 @@ public class ArcheryRangeModelGenerationController : MonoBehaviour
|
|||||||
modelGenerationInProgress = false;
|
modelGenerationInProgress = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Texture2D CreateTexture(byte[] imageBytes)
|
|
||||||
{
|
|
||||||
var tex = new Texture2D(2, 2, TextureFormat.RGBA32, false);
|
|
||||||
// ImageConversion.LoadImage returns bool (true = success)
|
|
||||||
if (!ImageConversion.LoadImage(tex, imageBytes, markNonReadable: false))
|
|
||||||
{
|
|
||||||
Destroy(tex);
|
|
||||||
throw new InvalidOperationException("Failed to decode image bytes into Texture2D.");
|
|
||||||
}
|
|
||||||
|
|
||||||
tex.filterMode = FilterMode.Bilinear;
|
|
||||||
tex.wrapMode = TextureWrapMode.Clamp;
|
|
||||||
|
|
||||||
return tex;
|
|
||||||
}
|
|
||||||
|
|
||||||
private Sprite CreateSprite(Texture2D tex)
|
|
||||||
{
|
|
||||||
var sprite = Sprite.Create(
|
|
||||||
tex,
|
|
||||||
new Rect(0, 0, tex.width, tex.height),
|
|
||||||
new Vector2(0.5f, 0.5f),
|
|
||||||
pixelsPerUnit: 100f
|
|
||||||
);
|
|
||||||
|
|
||||||
return sprite;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnModelReady()
|
private void OnModelReady()
|
||||||
{
|
{
|
||||||
foreach (MeshRenderer meshRenderer in wire.GetComponentsInChildren<MeshRenderer>())
|
foreach (MeshRenderer meshRenderer in wire.GetComponentsInChildren<MeshRenderer>())
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ public class ImageGenerationBox : MonoBehaviour
|
|||||||
public VoiceTranscriptionBox voiceTranscriptionBox;
|
public VoiceTranscriptionBox voiceTranscriptionBox;
|
||||||
public Image imageDisplay;
|
public Image imageDisplay;
|
||||||
public Texture2D LastTexture { get; private set; }
|
public Texture2D LastTexture { get; private set; }
|
||||||
public string promptSuffix = ", single object, front and side fully visible, realistic style, plain neutral background, clear details, soft studio lighting, true-to-scale";
|
|
||||||
|
|
||||||
private MeshRenderer meshRenderer;
|
private MeshRenderer meshRenderer;
|
||||||
private bool isLoading;
|
private bool isLoading;
|
||||||
@@ -37,47 +36,17 @@ void Start()
|
|||||||
XROrigin playerOrigin = other.GetComponent<XROrigin>();
|
XROrigin playerOrigin = other.GetComponent<XROrigin>();
|
||||||
if (controller != null || playerOrigin != null)
|
if (controller != null || playerOrigin != null)
|
||||||
{
|
{
|
||||||
string inputPrompt = voiceTranscriptionBox.GetTextOutput();
|
|
||||||
string refinedPrompt = inputPrompt + promptSuffix;
|
|
||||||
|
|
||||||
isLoading = true;
|
isLoading = true;
|
||||||
meshRenderer.material = loadingMaterial;
|
meshRenderer.material = loadingMaterial;
|
||||||
|
|
||||||
byte[] imageBytes = await InvokeAiClient.Instance.GenerateImage(refinedPrompt);
|
string inputPrompt = voiceTranscriptionBox.GetTextOutput();
|
||||||
LastTexture = CreateTexture(imageBytes);
|
byte[] imageBytes = await InvokeAiClient.Instance.GenerateImage(inputPrompt);
|
||||||
Sprite sprite = CreateSprite(LastTexture);
|
LastTexture = ModelGenerationUtils.CreateTexture(imageBytes);
|
||||||
|
Sprite sprite = ModelGenerationUtils.CreateSprite(LastTexture);
|
||||||
imageDisplay.sprite = sprite;
|
imageDisplay.sprite = sprite;
|
||||||
|
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
meshRenderer.material = inactiveMaterial;
|
meshRenderer.material = inactiveMaterial;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Texture2D CreateTexture(byte[] imageBytes)
|
|
||||||
{
|
|
||||||
var tex = new Texture2D(2, 2, TextureFormat.RGBA32, false);
|
|
||||||
// ImageConversion.LoadImage returns bool (true = success)
|
|
||||||
if (!ImageConversion.LoadImage(tex, imageBytes, markNonReadable: false))
|
|
||||||
{
|
|
||||||
Destroy(tex);
|
|
||||||
throw new InvalidOperationException("Failed to decode image bytes into Texture2D.");
|
|
||||||
}
|
|
||||||
|
|
||||||
tex.filterMode = FilterMode.Bilinear;
|
|
||||||
tex.wrapMode = TextureWrapMode.Clamp;
|
|
||||||
|
|
||||||
return tex;
|
|
||||||
}
|
|
||||||
|
|
||||||
private Sprite CreateSprite(Texture2D tex)
|
|
||||||
{
|
|
||||||
var sprite = Sprite.Create(
|
|
||||||
tex,
|
|
||||||
new Rect(0, 0, tex.width, tex.height),
|
|
||||||
new Vector2(0.5f, 0.5f),
|
|
||||||
pixelsPerUnit: 100f
|
|
||||||
);
|
|
||||||
|
|
||||||
return sprite;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ public class InvokeAiClient : MonoBehaviour
|
|||||||
public string INVOKEAI_BASE_URL;
|
public string INVOKEAI_BASE_URL;
|
||||||
public string DEFAULT_QUEUE_ID = "default";
|
public string DEFAULT_QUEUE_ID = "default";
|
||||||
public string MODEL_KEY;
|
public string MODEL_KEY;
|
||||||
|
public string promptSuffix = ", single object, front and side fully visible, realistic style, plain neutral background, clear details, soft studio lighting, true-to-scale";
|
||||||
|
|
||||||
private HttpClient httpClient;
|
private HttpClient httpClient;
|
||||||
|
|
||||||
@@ -519,9 +520,10 @@ public class InvokeAiClient : MonoBehaviour
|
|||||||
|
|
||||||
public async Task<byte[]> GenerateImage(string prompt)
|
public async Task<byte[]> GenerateImage(string prompt)
|
||||||
{
|
{
|
||||||
|
string refinedPrompt = prompt + promptSuffix;
|
||||||
JObject args = new JObject()
|
JObject args = new JObject()
|
||||||
{
|
{
|
||||||
["prompt"] = prompt,
|
["prompt"] = refinedPrompt,
|
||||||
["width"] = 512,
|
["width"] = 512,
|
||||||
["height"] = 512,
|
["height"] = 512,
|
||||||
["model_key"] = MODEL_KEY,
|
["model_key"] = MODEL_KEY,
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public class ModelGenerationBox : MonoBehaviour
|
|||||||
string encodedTexture = Convert.ToBase64String(inputTexture.EncodeToJPG());
|
string encodedTexture = Convert.ToBase64String(inputTexture.EncodeToJPG());
|
||||||
byte[] encodedModel = await TrellisClient.Instance.GenerateModel(encodedTexture);
|
byte[] encodedModel = await TrellisClient.Instance.GenerateModel(encodedTexture);
|
||||||
|
|
||||||
GameObject spawnedObject = await PipelineManager.Instance.SpawnModel(encodedModel);
|
GameObject spawnedObject = await ModelGenerationUtils.Instance.SpawnModel(encodedModel);
|
||||||
spawnedObject.AddComponent<Rigidbody>();
|
spawnedObject.AddComponent<Rigidbody>();
|
||||||
spawnedObject.transform.parent = modelSpawnPoint;
|
spawnedObject.transform.parent = modelSpawnPoint;
|
||||||
spawnedObject.transform.position = modelSpawnPoint.position;
|
spawnedObject.transform.position = modelSpawnPoint.position;
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
using GLTFast;
|
using GLTFast;
|
||||||
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class PipelineManager : MonoBehaviour
|
public class ModelGenerationUtils : MonoBehaviour
|
||||||
{
|
{
|
||||||
public static PipelineManager Instance { get; private set; }
|
public static ModelGenerationUtils Instance { get; private set; }
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
@@ -27,7 +28,7 @@ public class PipelineManager : MonoBehaviour
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate model by starting a new Python subprocess
|
* Generate model by starting a new Python subprocess
|
||||||
* NOT USED ANYMORE
|
* NOT USED IN LATEST VERSION
|
||||||
**/
|
**/
|
||||||
public async Task<string> GenerateModelAsync(string inputPrompt)
|
public async Task<string> GenerateModelAsync(string inputPrompt)
|
||||||
{
|
{
|
||||||
@@ -82,7 +83,7 @@ public class PipelineManager : MonoBehaviour
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Spawn model stored on disk
|
* Spawn model stored on disk
|
||||||
* NOT USED ANYMORE
|
* NOT USED IN LATEST VERSION
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
public async Task<GameObject> SpawnModel(string modelPath)
|
public async Task<GameObject> SpawnModel(string modelPath)
|
||||||
@@ -130,4 +131,33 @@ public class PipelineManager : MonoBehaviour
|
|||||||
|
|
||||||
throw new System.Exception("Failed to spawn GameObject " + objectName);
|
throw new System.Exception("Failed to spawn GameObject " + objectName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static Texture2D CreateTexture(byte[] imageBytes)
|
||||||
|
{
|
||||||
|
var tex = new Texture2D(2, 2, TextureFormat.RGBA32, false);
|
||||||
|
// ImageConversion.LoadImage returns bool (true = success)
|
||||||
|
if (!ImageConversion.LoadImage(tex, imageBytes, markNonReadable: false))
|
||||||
|
{
|
||||||
|
Destroy(tex);
|
||||||
|
throw new InvalidOperationException("Failed to decode image bytes into Texture2D.");
|
||||||
|
}
|
||||||
|
|
||||||
|
tex.filterMode = FilterMode.Bilinear;
|
||||||
|
tex.wrapMode = TextureWrapMode.Clamp;
|
||||||
|
|
||||||
|
return tex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Sprite CreateSprite(Texture2D tex)
|
||||||
|
{
|
||||||
|
var sprite = Sprite.Create(
|
||||||
|
tex,
|
||||||
|
new Rect(0, 0, tex.width, tex.height),
|
||||||
|
new Vector2(0.5f, 0.5f),
|
||||||
|
pixelsPerUnit: 100f
|
||||||
|
);
|
||||||
|
|
||||||
|
return sprite;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -58,20 +58,26 @@ public class PushableButton : MonoBehaviour
|
|||||||
movableParts.DOLocalMoveY(downPositionY, moveDuration);
|
movableParts.DOLocalMoveY(downPositionY, moveDuration);
|
||||||
isButtonDown = true;
|
isButtonDown = true;
|
||||||
|
|
||||||
|
if (wire != null)
|
||||||
|
{
|
||||||
foreach (MeshRenderer meshRenderer in wire.GetComponentsInChildren<MeshRenderer>())
|
foreach (MeshRenderer meshRenderer in wire.GetComponentsInChildren<MeshRenderer>())
|
||||||
{
|
{
|
||||||
meshRenderer.material = wireActiveMaterial;
|
meshRenderer.material = wireActiveMaterial;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void Deactivate()
|
public void Deactivate()
|
||||||
{
|
{
|
||||||
movableParts.DOLocalMoveY(upPositionY, moveDuration);
|
movableParts.DOLocalMoveY(upPositionY, moveDuration);
|
||||||
isButtonDown = false;
|
isButtonDown = false;
|
||||||
|
|
||||||
|
if (wire != null)
|
||||||
|
{
|
||||||
foreach (MeshRenderer meshRenderer in wire.GetComponentsInChildren<MeshRenderer>())
|
foreach (MeshRenderer meshRenderer in wire.GetComponentsInChildren<MeshRenderer>())
|
||||||
{
|
{
|
||||||
meshRenderer.material = wireInactiveMaterial;
|
meshRenderer.material = wireInactiveMaterial;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1,83 @@
|
|||||||
|
using FishNet.Component.Transforming;
|
||||||
|
using FishNet.Object;
|
||||||
|
using System;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
using UnityEngine.XR.Interaction.Toolkit;
|
||||||
|
|
||||||
|
public class ShapeDetectionMinigameController : MonoBehaviour
|
||||||
|
{
|
||||||
|
public MicrophoneStand microphoneStand;
|
||||||
|
public PushableButton imageGenerationButton;
|
||||||
|
public PushableButton modelGenerationButton;
|
||||||
|
public Texture2D GeneratedTexture { get; private set; }
|
||||||
|
public Image imageDisplay;
|
||||||
|
|
||||||
|
public GameObject GeneratedModel { get; private set; }
|
||||||
|
public Transform modelSpawnPoint;
|
||||||
|
public string shapeScannerTag = "ShapeScannable";
|
||||||
|
|
||||||
|
private bool modelGenerationInProgress;
|
||||||
|
|
||||||
|
// Start is called before the first frame update
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
imageGenerationButton.OnButtonPressed += InvokeImageGeneration;
|
||||||
|
modelGenerationButton.OnButtonPressed += InvokeModelGeneration;
|
||||||
|
modelGenerationInProgress = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void InvokeImageGeneration()
|
||||||
|
{
|
||||||
|
string inputPrompt = microphoneStand.GetTextOutput();
|
||||||
|
byte[] imageBytes = await InvokeAiClient.Instance.GenerateImage(inputPrompt);
|
||||||
|
GeneratedTexture = ModelGenerationUtils.CreateTexture(imageBytes);
|
||||||
|
Sprite sprite = ModelGenerationUtils.CreateSprite(GeneratedTexture);
|
||||||
|
imageDisplay.sprite = sprite;
|
||||||
|
|
||||||
|
imageGenerationButton.Deactivate();
|
||||||
|
if (!modelGenerationInProgress)
|
||||||
|
{
|
||||||
|
modelGenerationButton.Deactivate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void InvokeModelGeneration()
|
||||||
|
{
|
||||||
|
modelGenerationInProgress = true;
|
||||||
|
string encodedTexture = Convert.ToBase64String(GeneratedTexture.EncodeToJPG());
|
||||||
|
byte[] encodedModel = await TrellisClient.Instance.GenerateModel(encodedTexture);
|
||||||
|
|
||||||
|
GameObject spawnedObject = await ModelGenerationUtils.Instance.SpawnModel(encodedModel);
|
||||||
|
InitializeSpawnedObject(spawnedObject);
|
||||||
|
|
||||||
|
// Destroy previous generated object
|
||||||
|
Destroy(GeneratedModel);
|
||||||
|
GeneratedModel = spawnedObject;
|
||||||
|
|
||||||
|
modelGenerationButton.Deactivate();
|
||||||
|
modelGenerationInProgress = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InitializeSpawnedObject(GameObject spawnedObject)
|
||||||
|
{
|
||||||
|
Rigidbody rigidbody = spawnedObject.AddComponent<Rigidbody>();
|
||||||
|
rigidbody.isKinematic = true;
|
||||||
|
|
||||||
|
//spawnedObject.AddComponent<NetworkObject>();
|
||||||
|
//spawnedObject.AddComponent<NetworkTransform>();
|
||||||
|
spawnedObject.transform.parent = modelSpawnPoint;
|
||||||
|
spawnedObject.transform.position = modelSpawnPoint.position;
|
||||||
|
spawnedObject.tag = shapeScannerTag;
|
||||||
|
|
||||||
|
spawnedObject.SetActive(true);
|
||||||
|
|
||||||
|
spawnedObject.AddComponent<XRGrabInteractable>();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 7000d3fd17422c74e9f86757bc8529f0
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -6,6 +6,7 @@ public class ShapeScannerRay : MonoBehaviour
|
|||||||
{
|
{
|
||||||
public Material _activeMaterial;
|
public Material _activeMaterial;
|
||||||
public Material _passiveMaterial;
|
public Material _passiveMaterial;
|
||||||
|
public string scannableTag = "ShapeScannable";
|
||||||
|
|
||||||
private ShapeScanner _scanner;
|
private ShapeScanner _scanner;
|
||||||
private MeshRenderer meshRenderer;
|
private MeshRenderer meshRenderer;
|
||||||
@@ -33,7 +34,7 @@ public class ShapeScannerRay : MonoBehaviour
|
|||||||
|
|
||||||
private void OnTriggerEnter(Collider other)
|
private void OnTriggerEnter(Collider other)
|
||||||
{
|
{
|
||||||
if (other.gameObject.tag == "ShapeScannable")
|
if (other.gameObject.tag == scannableTag)
|
||||||
{
|
{
|
||||||
meshRenderer.material = _activeMaterial;
|
meshRenderer.material = _activeMaterial;
|
||||||
if (_collisionRequired)
|
if (_collisionRequired)
|
||||||
|
|||||||
Reference in New Issue
Block a user