1
0
mirror of https://projects.caleb-brown.dev/UDRI-XRT/UDRIGEEKCup2024.git synced 2025-01-22 07:08:51 -05:00

Minor Refactor to the hole trigger componet

This commit is contained in:
cbrown 2024-04-16 14:11:13 -04:00
parent 99b6677ebe
commit 875c921d18
7 changed files with 408 additions and 16 deletions

View File

@ -1,5 +1,87 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1047080018429688043
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9192082798296771496}
- component: {fileID: 1032410590842478077}
- component: {fileID: 7163305222476569851}
m_Layer: 7
m_Name: GoalTrigger
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &9192082798296771496
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1047080018429688043}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: -1.277, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8649987843805268783}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!135 &1032410590842478077
SphereCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1047080018429688043}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 1
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Radius: 0.6
m_Center: {x: 0, y: 0, z: 0}
--- !u!114 &7163305222476569851
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1047080018429688043}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1d1605eb45b6d498aba96ddda565cb6a, type: 3}
m_Name:
m_EditorClassIdentifier:
invertResult: 0
onTrigger:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 11400000, guid: 3b0e06d0a76bceb4296c54d02f0d34a4, type: 2}
m_TargetAssemblyTypeName: UnityAtoms.AtomVariable`5[[System.Boolean, mscorlib
m_MethodName: set_Value
m_Mode: 0
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!1 &6121683813469744371
GameObject:
m_ObjectHideFlags: 0
@ -27,11 +109,12 @@ Transform:
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_ConstrainProportionsScale: 0
m_ConstrainProportionsScale: 1
m_Children:
- {fileID: 84093497478952920}
- {fileID: 7868759862830558622}
- {fileID: 6595505223521729305}
- {fileID: 9192082798296771496}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &6783148664893773472
@ -102,6 +185,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 1d1605eb45b6d498aba96ddda565cb6a, type: 3}
m_Name:
m_EditorClassIdentifier:
invertResult: 1
onTrigger:
m_PersistentCalls:
m_Calls: []

View File

@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.18028378, g: 0.22571412, b: 0.30692285, a: 1}
m_IndirectSpecularColor: {r: 0.18028373, g: 0.22571398, b: 0.30692294, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
@ -960,7 +960,7 @@ GameObject:
- component: {fileID: 371693855}
- component: {fileID: 371693854}
- component: {fileID: 371693853}
m_Layer: 0
m_Layer: 6
m_Name: GreensCube
m_TagString: Untagged
m_Icon: {fileID: 0}
@ -996,7 +996,7 @@ MeshRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 371693851}
m_Enabled: 1
m_CastShadows: 1
m_CastShadows: 0
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
@ -1805,6 +1805,129 @@ MonoBehaviour:
m_Flags: 0
m_Reference: {fileID: 0}
m_ButtonPressPoint: 0.5
--- !u!1001 &765559386
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 386271633039628962, guid: 67b92308c184e4945a702caf44784747,
type: 3}
propertyPath: m_Mesh
value:
objectReference: {fileID: 1891054743}
- target: {fileID: 2781607421383488419, guid: 67b92308c184e4945a702caf44784747,
type: 3}
propertyPath: onTrigger.m_PersistentCalls.m_Calls.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2781607421383488419, guid: 67b92308c184e4945a702caf44784747,
type: 3}
propertyPath: onTrigger.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 371693853}
- target: {fileID: 2781607421383488419, guid: 67b92308c184e4945a702caf44784747,
type: 3}
propertyPath: onTrigger.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
value: 2
objectReference: {fileID: 0}
- target: {fileID: 2781607421383488419, guid: 67b92308c184e4945a702caf44784747,
type: 3}
propertyPath: onTrigger.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: set_enabled
objectReference: {fileID: 0}
- target: {fileID: 2781607421383488419, guid: 67b92308c184e4945a702caf44784747,
type: 3}
propertyPath: onTrigger.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName
value: UnityEngine.Collider, UnityEngine
objectReference: {fileID: 0}
- target: {fileID: 2781607421383488419, guid: 67b92308c184e4945a702caf44784747,
type: 3}
propertyPath: onTrigger.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0}
- target: {fileID: 4851804087237104553, guid: 67b92308c184e4945a702caf44784747,
type: 3}
propertyPath: m_Mesh
value:
objectReference: {fileID: 1891054743}
- target: {fileID: 6121683813469744371, guid: 67b92308c184e4945a702caf44784747,
type: 3}
propertyPath: m_Name
value: Hole
objectReference: {fileID: 0}
- target: {fileID: 8649987843805268783, guid: 67b92308c184e4945a702caf44784747,
type: 3}
propertyPath: m_LocalScale.x
value: 0.15
objectReference: {fileID: 0}
- target: {fileID: 8649987843805268783, guid: 67b92308c184e4945a702caf44784747,
type: 3}
propertyPath: m_LocalScale.y
value: 0.15
objectReference: {fileID: 0}
- target: {fileID: 8649987843805268783, guid: 67b92308c184e4945a702caf44784747,
type: 3}
propertyPath: m_LocalScale.z
value: 0.15
objectReference: {fileID: 0}
- target: {fileID: 8649987843805268783, guid: 67b92308c184e4945a702caf44784747,
type: 3}
propertyPath: m_LocalPosition.x
value: -0.004
objectReference: {fileID: 0}
- target: {fileID: 8649987843805268783, guid: 67b92308c184e4945a702caf44784747,
type: 3}
propertyPath: m_LocalPosition.y
value: -0.027999878
objectReference: {fileID: 0}
- target: {fileID: 8649987843805268783, guid: 67b92308c184e4945a702caf44784747,
type: 3}
propertyPath: m_LocalPosition.z
value: 2.533
objectReference: {fileID: 0}
- target: {fileID: 8649987843805268783, guid: 67b92308c184e4945a702caf44784747,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8649987843805268783, guid: 67b92308c184e4945a702caf44784747,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8649987843805268783, guid: 67b92308c184e4945a702caf44784747,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8649987843805268783, guid: 67b92308c184e4945a702caf44784747,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8649987843805268783, guid: 67b92308c184e4945a702caf44784747,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8649987843805268783, guid: 67b92308c184e4945a702caf44784747,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8649987843805268783, guid: 67b92308c184e4945a702caf44784747,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 67b92308c184e4945a702caf44784747, type: 3}
--- !u!1 &1028760414
GameObject:
m_ObjectHideFlags: 0
@ -1896,7 +2019,7 @@ GameObject:
- component: {fileID: 1507380961}
- component: {fileID: 1507380960}
- component: {fileID: 1507380959}
m_Layer: 0
m_Layer: 6
m_Name: FairwayCube
m_TagString: Untagged
m_Icon: {fileID: 0}
@ -2001,7 +2124,7 @@ GameObject:
- component: {fileID: 1752515855}
- component: {fileID: 1752515854}
- component: {fileID: 1752515853}
m_Layer: 0
m_Layer: 6
m_Name: RoughCube
m_TagString: Untagged
m_Icon: {fileID: 0}
@ -2585,6 +2708,171 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!43 &1891054743
Mesh:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: pb_Mesh-249500
serializedVersion: 11
m_SubMeshes:
- serializedVersion: 2
firstByte: 0
indexCount: 60
topology: 0
baseVertex: 0
firstVertex: 0
vertexCount: 21
localAABB:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0.5, y: 0, z: 0.5}
m_Shapes:
vertices: []
shapes: []
channels: []
fullWeights: []
m_BindPose: []
m_BoneNameHashes:
m_RootBoneNameHash: 0
m_BonesAABB: []
m_VariableBoneCountWeights:
m_Data:
m_MeshCompression: 0
m_IsReadable: 1
m_KeepVertices: 1
m_KeepIndices: 1
m_IndexFormat: 0
m_IndexBuffer: 000001000200020001000300030001000400040001000500050001000600060001000700070001000800080001000900090001000a000a0001000b000b0001000c000c0001000d000d0001000e000e0001000f000f0001001000100001001100110001001200120001001300130001001400140001000000
m_VertexData:
serializedVersion: 3
m_VertexCount: 21
m_Channels:
- stream: 0
offset: 0
format: 0
dimension: 3
- stream: 0
offset: 12
format: 0
dimension: 3
- stream: 0
offset: 24
format: 0
dimension: 4
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 40
format: 0
dimension: 2
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
m_DataSize: 1008
_typelessdata: 0000003f0000000000000000000000000000803f000000000000803f0000000000000000000080bf0000003f00000000000000000000000000000000000000000000803f000000000000803f0000000000000000000080bf00000000000000007078f33e0000000078371e3e000000000000803f000000000000803f0000000000000000000080bf7078f33e78371e3ebc1bcf3e000000001879963e000000000000803f000000000000803f0000000000000000000080bfbc1bcf3e1879963e1879963e00000000bc1bcf3e000000000000803f000000000000803f0000000000000000000080bf1879963ebc1bcf3e78371e3e000000007078f33e000000000000803f000000000000803f0000000000000000000080bf78371e3e7078f33e000000b3000000000000003f000000000000803f000000000000803f0000000000000000000080bf000000b30000003f78371ebe000000007078f33e000000000000803f000000000000803f0000000000000000000080bf78371ebe7078f33e177996be00000000bc1bcf3e000000000000803f000000000000803f0000000000000000000080bf177996bebc1bcf3ebe1bcfbe000000001879963e000000000000803f000000000000803f0000000000000000000080bfbe1bcfbe1879963e7078f3be000000007c371e3e000000000000803f000000000000803f0000000000000000000080bf7078f3be7c371e3e000000bf00000000000000b3000000000000803f000000000000803f0000000000000000000080bf000000bf000000b37178f3be0000000078371ebe000000000000803f000000000000803f0000000000000000000080bf7178f3be78371ebebe1bcfbe00000000167996be000000000000803f000000000000803f0000000000000000000080bfbe1bcfbe167996be1b7996be00000000ba1bcfbe000000000000803f000000000000803f0000000000000000000080bf1b7996beba1bcfbe7d371ebe000000007078f3be000000000000803f000000000000803f0000000000000000000080bf7d371ebe7078f3be0000000000000000000000bf000000000000803f000000000000803f0000000000000000000080bf00000000000000bf7e371e3e000000007078f3be000000000000803f000000000000803f0000000000000000000080bf7e371e3e7078f3be1479963e00000000bf1bcfbe000000000000803f000000000000803f0000000000000000000080bf1479963ebf1bcfbebc1bcf3e00000000197996be000000000000803f000000000000803f0000000000000000000080bfbc1bcf3e197996be7078f33e0000000078371ebe000000000000803f000000000000803f0000000000000000000080bf7078f33e78371ebe
m_CompressedMesh:
m_Vertices:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_UV:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_Normals:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_Tangents:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_Weights:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_NormalSigns:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_TangentSigns:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_FloatColors:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_BoneIndices:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_Triangles:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_UVInfo: 0
m_LocalAABB:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0.5, y: 0, z: 0.5}
m_MeshUsageFlags: 0
m_CookingOptions: 30
m_BakedConvexCollisionMesh:
m_BakedTriangleCollisionMesh:
m_MeshMetrics[0]: 1
m_MeshMetrics[1]: 1
m_MeshOptimizationFlags: 1
m_StreamData:
serializedVersion: 2
offset: 0
size: 0
path:
--- !u!1 &1994603662
GameObject:
m_ObjectHideFlags: 0
@ -3055,7 +3343,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!223 &2157112596036009563
Canvas:
m_ObjectHideFlags: 0
@ -3902,7 +4190,7 @@ GameObject:
- component: {fileID: 8741305066849015582}
m_Layer: 0
m_Name: TestGolfBall
m_TagString: Untagged
m_TagString: Player
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@ -4174,3 +4462,4 @@ SceneRoots:
- {fileID: 1507380962}
- {fileID: 1752515856}
- {fileID: 371693856}
- {fileID: 765559386}

View File

@ -5,8 +5,11 @@ using UnityEngine.Events;
namespace MAVRIC.GEEKCup
{
public class DeactivateColliderOnTrigger : MonoBehaviour
[RequireComponent(typeof(Collider))]
public class OnTrigger : MonoBehaviour
{
[SerializeField] private bool invertResult = false;
// TODO: Update this to use a UnityAtoms BoolReference
[SerializeField] private UnityEvent<bool> onTrigger;
@ -15,7 +18,7 @@ namespace MAVRIC.GEEKCup
// TODO: Update this to a different system
if (other.CompareTag("Player"))
{
onTrigger?.Invoke(false);
onTrigger?.Invoke(!invertResult);
}
}
@ -23,7 +26,7 @@ namespace MAVRIC.GEEKCup
{
if (other.CompareTag("Player"))
{
onTrigger?.Invoke(true);
onTrigger?.Invoke(invertResult);
}
}
}

View File

@ -105,9 +105,9 @@ MonoBehaviour:
m_PrefilterDBufferMRT2: 1
m_PrefilterDBufferMRT3: 1
m_PrefilterSoftShadowsQualityLow: 1
m_PrefilterSoftShadowsQualityMedium: 0
m_PrefilterSoftShadowsQualityMedium: 1
m_PrefilterSoftShadowsQualityHigh: 1
m_PrefilterSoftShadows: 1
m_PrefilterSoftShadows: 0
m_PrefilterScreenCoord: 1
m_PrefilterNativeRenderPass: 1
m_ShaderVariantLogLevel: 0

View File

@ -0,0 +1,16 @@
{
"MonoBehaviour": {
"Version": 4,
"EnableBurstCompilation": true,
"EnableOptimisations": true,
"EnableSafetyChecks": false,
"EnableDebugInAllBuilds": false,
"DebugDataKind": 1,
"EnableArmv9SecurityFeatures": false,
"CpuMinTargetX32": 0,
"CpuMaxTargetX32": 0,
"CpuMinTargetX64": 0,
"CpuMaxTargetX64": 0,
"OptimizeFor": 0
}
}

View File

@ -163,7 +163,7 @@ PlayerSettings:
applicationIdentifier:
Android: com.unity.template.ar_mobile
Standalone: com.unity.template.ar-mobile
iPhone: com.unity.template.armobile
iPhone: edu.udayton.udri.mavric.geekcup.2024
buildNumber:
Bratwurst: 0
Standalone: 0
@ -242,10 +242,10 @@ PlayerSettings:
iOSManualSigningProvisioningProfileID:
tvOSManualSigningProvisioningProfileID:
VisionOSManualSigningProvisioningProfileID:
iOSManualSigningProvisioningProfileType: 0
iOSManualSigningProvisioningProfileType: 1
tvOSManualSigningProvisioningProfileType: 0
VisionOSManualSigningProvisioningProfileType: 0
appleEnableAutomaticSigning: 0
appleEnableAutomaticSigning: 1
iOSRequireARKit: 0
iOSAutomaticallyDetectAndAddCapabilities: 1
appleEnableProMotion: 0