5 Commits

Author SHA1 Message Date
Chris
41175a1f3b added: lock on target graphic 2025-03-20 15:24:28 -04:00
Chris
99bd1e586d Merge remote-tracking branch 'origin/main' into player/rotation-and-lock-on
# Conflicts:
#	Assets/Scenes/SampleScene.unity
2025-03-19 15:53:57 -04:00
Chris
ee40868efe added: lock-on mechanics testing 2025-03-19 15:51:41 -04:00
Chris
49baf84191 changed: cinemachine changes 2025-03-14 19:12:51 -04:00
Chris
13198d5b31 maint: updated rider package 2025-03-14 17:31:24 -04:00
21 changed files with 694 additions and 34 deletions

View File

@@ -0,0 +1,138 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-1337973609843613944
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: 9
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: LockOnMarkerMaterial
m_Shader: {fileID: 4800000, guid: 650dd9526735d5b46b79224bc6e94025, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Opaque
disabledShaderPasses:
- MOTIONVECTORS
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:
- _AddPrecomputedVelocity: 0
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BlendOp: 0
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _SampleGI: 0
- _Smoothness: 0
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 0.027940448, b: 0, a: 1}
- _Color: {r: 1, g: 0.027940448, b: 0, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f35636ac19f6c5540bb5d617fc126d1b
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f10ad97089bbafa42b0db0242fafb678
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e45b89ba6f77d1143bc70dc6be5a042c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@@ -0,0 +1,117 @@
fileFormatVersion: 2
guid: fca1c462b5714044698de6793787093a
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
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
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
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
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 95717261bf5cd404c9af8d0687946f9f
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="False">
<ui:VisualElement name="StretchBG" style="width: 100%; height: 100%;">
<ui:VisualElement name="LockOnGroup" style="align-items: center; align-self: flex-start;">
<ui:Label text="Unit Name" name="LockOnName" style="color: rgb(255, 255, 255); font-size: 29px; -unity-font-style: bold; -unity-font-definition: resource(&apos;FlatSkin/Font/Roboto-Bold&apos;);" />
<ui:VisualElement name="LockOnIcon" style="flex-grow: 1; height: 40px; width: 40px; background-image: url(&quot;project://database/Assets/Core/UI/In-Game/Graphics/Icon-LockOnTarget.png?fileID=2800000&amp;guid=fca1c462b5714044698de6793787093a&amp;type=3#Icon-LockOnTarget&quot;); -unity-background-image-tint-color: rgb(238, 66, 66);" />
</ui:VisualElement>
</ui:VisualElement>
</ui:UXML>

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 15d71cf51a4522243a18f0eb02136f97
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 332ebc10ca36806438fa8fa34c8ae75e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ff22b76012588a14ea5c416a6bdb3675
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,22 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1549551891, guid: 74721b9f0af448f5ae2e91102a1a5edd, type: 3}
m_Name: GlobalSerializationConfig
m_EditorClassIdentifier:
HideSerializationCautionaryMessage: 0
HidePrefabCautionaryMessage: 0
HideOdinSerializeAttributeWarningMessages: 0
HideNonSerializedShowInInspectorWarningMessages: 0
buildSerializationFormat: 0
editorSerializationFormat: 2
loggingPolicy: 0
errorHandlingPolicy: 0

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 80afd68f242384c41bb24e8c133233ee
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -129,7 +129,7 @@ GameObject:
m_Component: m_Component:
- component: {fileID: 13380929} - component: {fileID: 13380929}
m_Layer: 0 m_Layer: 0
m_Name: Scene Basics m_Name: Scene Setup
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
@@ -531,6 +531,9 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 958415517}
- {fileID: 653587992}
- {fileID: 1719721039}
- {fileID: 1716635937} - {fileID: 1716635937}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -2442,13 +2445,14 @@ GameObject:
- component: {fileID: 263093402} - component: {fileID: 263093402}
- component: {fileID: 263093401} - component: {fileID: 263093401}
- component: {fileID: 263093400} - component: {fileID: 263093400}
- component: {fileID: 263093404}
m_Layer: 0 m_Layer: 0
m_Name: Lock-On Target m_Name: Lock-On Target
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 0
--- !u!136 &263093400 --- !u!136 &263093400
CapsuleCollider: CapsuleCollider:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -2540,6 +2544,18 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &263093404
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 263093399}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a9e423f169119154e9b1379ef904eb46, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &330585543 --- !u!1 &330585543
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -2628,12 +2644,12 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 330585543} m_GameObject: {fileID: 330585543}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0.09175019, y: 0.05080059, z: -0.0046868618, w: 0.9944744} m_LocalRotation: {x: 0.015995976, y: -0.067584075, z: 0.0010836906, w: 0.99758476}
m_LocalPosition: {x: 0, y: 2.9612432, z: -6.423195} m_LocalPosition: {x: 1.5039132, y: 2.1421127, z: -6.8609486}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 1721384111}
m_LocalEulerAnglesHint: {x: 12.23, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 12.23, y: 0, z: 0}
--- !u!114 &330585547 --- !u!114 &330585547
MonoBehaviour: MonoBehaviour:
@@ -2822,9 +2838,10 @@ GameObject:
- component: {fileID: 402424905} - component: {fileID: 402424905}
- component: {fileID: 402424907} - component: {fileID: 402424907}
- component: {fileID: 402424909} - component: {fileID: 402424909}
- component: {fileID: 402424910}
- component: {fileID: 402424908} - component: {fileID: 402424908}
m_Layer: 0 m_Layer: 0
m_Name: CinemachineCamera m_Name: Cinemachine
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
@@ -2851,8 +2868,8 @@ MonoBehaviour:
m_LegacyPriority: 0 m_LegacyPriority: 0
Target: Target:
TrackingTarget: {fileID: 1992890473} TrackingTarget: {fileID: 1992890473}
LookAtTarget: {fileID: 0} LookAtTarget: {fileID: 615613681}
CustomLookAtTarget: 0 CustomLookAtTarget: 1
Lens: Lens:
FieldOfView: 80 FieldOfView: 80
OrthographicSize: 5 OrthographicSize: 5
@@ -2881,12 +2898,12 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 402424904} m_GameObject: {fileID: 402424904}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0.09175018, y: 0.05080059, z: -0.0046868613, w: 0.9944744} m_LocalRotation: {x: 0.015995974, y: -0.06758407, z: 0.0010836904, w: 0.9975848}
m_LocalPosition: {x: 0, y: 2.9612432, z: -6.423195} m_LocalPosition: {x: 1.5039132, y: 2.1421127, z: -6.8609486}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 1721384111}
m_LocalEulerAnglesHint: {x: 16.298, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 16.298, y: 0, z: 0}
--- !u!114 &402424907 --- !u!114 &402424907
MonoBehaviour: MonoBehaviour:
@@ -2905,7 +2922,7 @@ MonoBehaviour:
BindingMode: 0 BindingMode: 0
PositionDamping: {x: 1, y: 1, z: 1} PositionDamping: {x: 1, y: 1, z: 1}
AngularDampingMode: 0 AngularDampingMode: 0
RotationDamping: {x: 0.7, y: 0.7, z: 0.7} RotationDamping: {x: 0, y: 0, z: 0}
QuaternionDamping: 1 QuaternionDamping: 1
OrbitStyle: 1 OrbitStyle: 1
Radius: 10 Radius: 10
@@ -3038,6 +3055,27 @@ MonoBehaviour:
Time: 0 Time: 0
Smoothing: 0 Smoothing: 0
IgnoreY: 0 IgnoreY: 0
--- !u!114 &402424910
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 402424904}
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4eb4843bae7d24943842ea23130dcd55, type: 3}
m_Name:
m_EditorClassIdentifier:
FramingMode: 2
FramingSize: 0.8
CenterOffset: {x: 0, y: -0.39}
Damping: 2
SizeAdjustment: 2
LateralAdjustment: 0
FovRange: {x: 1, y: 100}
DollyRange: {x: -100, y: 100}
OrthoSizeRange: {x: 1, y: 1000}
--- !u!1 &410087039 --- !u!1 &410087039
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -3324,6 +3362,61 @@ Mesh:
offset: 0 offset: 0
size: 0 size: 0
path: path:
--- !u!1 &615613679
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 615613681}
- component: {fileID: 615613680}
m_Layer: 0
m_Name: Target Group
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &615613680
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 615613679}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e5eb80d8e62d9d145bb50fb783c0f731, type: 3}
m_Name:
m_EditorClassIdentifier:
PositionMode: 1
RotationMode: 0
UpdateMethod: 2
Targets:
- Object: {fileID: 1992890473}
Weight: 1
Radius: 3.64
- Object: {fileID: 1379573506}
Weight: 0.15
Radius: 3.64
m_LegacyTargets: []
--- !u!4 &615613681
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 615613679}
serializedVersion: 2
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_Children: []
m_Father: {fileID: 1721384111}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &653587986 --- !u!1 &653587986
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -3670,11 +3763,11 @@ Transform:
m_GameObject: {fileID: 653587986} m_GameObject: {fileID: 653587986}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 1.0257127e-17, y: 0.38268277, z: -4.2486325e-18, w: 0.92387986} m_LocalRotation: {x: 1.0257127e-17, y: 0.38268277, z: -4.2486325e-18, w: 0.92387986}
m_LocalPosition: {x: -3, y: 0.5, z: -29} m_LocalPosition: {x: -3.9471753, y: 0.5, z: -28.550964}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 204093123}
m_LocalEulerAnglesHint: {x: 0, y: 45, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 45, z: 0}
--- !u!43 &793767078 --- !u!43 &793767078
Mesh: Mesh:
@@ -4209,7 +4302,8 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0, y: 0, z: 0}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children:
- {fileID: 1223043170}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
@@ -4562,12 +4656,12 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 958415511} m_GameObject: {fileID: 958415511}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 1.1102231e-17, y: 0, z: 0, w: 1} m_LocalRotation: {x: 1.1102231e-17, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 21.7127, y: 3.5, z: 0.31563377} m_LocalPosition: {x: 20.765524, y: 3.5, z: 0.76466966}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 204093123}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!43 &993603345 --- !u!43 &993603345
Mesh: Mesh:
@@ -4975,6 +5069,57 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1223043169
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1223043170}
- component: {fileID: 1223043171}
m_Layer: 5
m_Name: UIDocument
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1223043170
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1223043169}
serializedVersion: 2
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_Children: []
m_Father: {fileID: 928657081}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1223043171
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1223043169}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 19102, guid: 0000000000000000e000000000000000, type: 0}
m_Name:
m_EditorClassIdentifier:
m_PanelSettings: {fileID: 11400000, guid: fd99678e30619394f8e6ce439fbd7f43, type: 2}
m_ParentUI: {fileID: 0}
sourceAsset: {fileID: 9197481963319205126, guid: 15d71cf51a4522243a18f0eb02136f97, type: 3}
m_SortingOrder: 0
m_WorldSpaceSizeMode: 1
m_WorldSpaceWidth: 1920
m_WorldSpaceHeight: 1080
--- !u!43 &1227766312 --- !u!43 &1227766312
Mesh: Mesh:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -5152,6 +5297,7 @@ GameObject:
- component: {fileID: 1379573505} - component: {fileID: 1379573505}
- component: {fileID: 1379573504} - component: {fileID: 1379573504}
- component: {fileID: 1379573503} - component: {fileID: 1379573503}
- component: {fileID: 1379573507}
m_Layer: 0 m_Layer: 0
m_Name: Lock-On Target m_Name: Lock-On Target
m_TagString: Untagged m_TagString: Untagged
@@ -5250,6 +5396,18 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1379573507
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1379573502}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a9e423f169119154e9b1379ef904eb46, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1505662770 --- !u!1 &1505662770
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -5262,13 +5420,14 @@ GameObject:
- component: {fileID: 1505662773} - component: {fileID: 1505662773}
- component: {fileID: 1505662772} - component: {fileID: 1505662772}
- component: {fileID: 1505662771} - component: {fileID: 1505662771}
- component: {fileID: 1505662775}
m_Layer: 0 m_Layer: 0
m_Name: Lock-On Target m_Name: Lock-On Target
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 0
--- !u!136 &1505662771 --- !u!136 &1505662771
CapsuleCollider: CapsuleCollider:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -5354,12 +5513,24 @@ Transform:
m_GameObject: {fileID: 1505662770} m_GameObject: {fileID: 1505662770}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -20.93, y: 1, z: -0.15} m_LocalPosition: {x: -1.9300003, y: 1, z: 10.85}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1505662775
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1505662770}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a9e423f169119154e9b1379ef904eb46, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1568412095 --- !u!1 &1568412095
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -6332,11 +6503,45 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1719721033} m_GameObject: {fileID: 1719721033}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 1.110223e-17, y: 0, z: 0, w: 1} m_LocalRotation: {x: 1.110223e-17, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 3.7876587, y: 0.5, z: -20.959927} m_LocalPosition: {x: 2.8404834, y: 0.5, z: -20.510891}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 204093123}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1721384110
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1721384111}
m_Layer: 0
m_Name: Camera
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1721384111
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1721384110}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -1.5039132, y: 0.81913054, z: 0.43775353}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 330585546}
- {fileID: 402424906}
- {fileID: 615613681}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1992890470 --- !u!1 &1992890470
@@ -6355,6 +6560,7 @@ GameObject:
- component: {fileID: 1992890476} - component: {fileID: 1992890476}
- component: {fileID: 1992890478} - component: {fileID: 1992890478}
- component: {fileID: 1992890477} - component: {fileID: 1992890477}
- component: {fileID: 1992890479}
m_Layer: 0 m_Layer: 0
m_Name: Player m_Name: Player
m_TagString: Untagged m_TagString: Untagged
@@ -6530,7 +6736,7 @@ MonoBehaviour:
_version: 3.31 _version: 3.31
_category: _category:
_comments: _comments:
_translation: {x: 686, y: 205} _translation: {x: 601, y: 245}
_zoomFactor: 1 _zoomFactor: 1
_firstActivation: 0 _firstActivation: 0
_enableAction: 0 _enableAction: 0
@@ -6540,6 +6746,20 @@ MonoBehaviour:
_updateMode: 0 _updateMode: 0
_graph: {fileID: 0} _graph: {fileID: 0}
_blackboard: {fileID: 1992890477} _blackboard: {fileID: 1992890477}
--- !u!114 &1992890479
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1992890470}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 092c74123418b7a4482fc45aa5870077, type: 3}
m_Name:
m_EditorClassIdentifier:
lockOnDocument: {fileID: 1223043171}
lockOnTarget: {fileID: 1379573502}
--- !u!1 &2024357130 --- !u!1 &2024357130
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -6623,19 +6843,15 @@ Transform:
SceneRoots: SceneRoots:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_Roots: m_Roots:
- {fileID: 13380929}
- {fileID: 846582218} - {fileID: 846582218}
- {fileID: 1164382988} - {fileID: 1164382988}
- {fileID: 410087041} - {fileID: 410087041}
- {fileID: 832575519} - {fileID: 832575519}
- {fileID: 204093123} - {fileID: 204093123}
- {fileID: 13380929} - {fileID: 1721384111}
- {fileID: 330585546}
- {fileID: 402424906}
- {fileID: 1992890473} - {fileID: 1992890473}
- {fileID: 1568412101} - {fileID: 1568412101}
- {fileID: 958415517}
- {fileID: 653587992}
- {fileID: 1719721039}
- {fileID: 220680271} - {fileID: 220680271}
- {fileID: 928657081} - {fileID: 928657081}
- {fileID: 2024357133} - {fileID: 2024357133}

View File

@@ -0,0 +1,15 @@
using UnityEngine;
public class GenericLockOnTarget : MonoBehaviour, ILockOnTarget{
public float lockonTargetRadius{ get; set; } = 1f;
public Renderer thisRenderer { get; }
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start(){
}
void Update(){
Debug.Log((this as ILockOnTarget).GetReticlePosition());
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: a9e423f169119154e9b1379ef904eb46

View File

@@ -8,7 +8,6 @@ using UnityEngine.InputSystem;
namespace NodeCanvas.Tasks.Actions { namespace NodeCanvas.Tasks.Actions {
[Category("Reset/Movement")] [Category("Reset/Movement")]
public class AddJump : ActionTask<CharacterController> { public class AddJump : ActionTask<CharacterController> {
public BBParameter<float> jumpStrength; public BBParameter<float> jumpStrength;

View File

@@ -0,0 +1,50 @@
using Sirenix.OdinInspector;
using UnityEngine;
using UnityEngine.UIElements;
public class LockOnManager : MonoBehaviour{
[ShowInInspector]
public UIDocument lockOnDocument;
public GameObject lockOnTarget;
private Label elementLabelName;
private VisualElement elementRoot;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
if (lockOnTarget.GetComponent<ILockOnTarget>() == null) {
Debug.LogError($"Game Object {lockOnTarget.name} does not implement the ILockOnTarget interface. Not processing lock-on actions!");
}
elementRoot = lockOnDocument.rootVisualElement.Query<VisualElement>("LockOnGroup");
elementLabelName = lockOnDocument.rootVisualElement.Query<Label>("LockOnName").First();
}
// Update is called once per frame
void LateUpdate(){
if (lockOnTarget.GetComponent<ILockOnTarget>() != null) {
// This is just test logic to get an image above a lock on.
// TODO: Replace with something less silly
Vector2 screenPos = RuntimePanelUtils.CameraTransformWorldToPanel(
lockOnDocument.rootVisualElement.panel,
lockOnTarget.GetComponent<ILockOnTarget>().GetReticlePosition(),
Camera.main.GetComponent<Camera>()
);
// Set name
elementLabelName.name = lockOnTarget.name;
// Set position (add the width/height of the element)
elementRoot.style.top = new StyleLength(screenPos.y - elementRoot.resolvedStyle.height * .7f );
elementRoot.style.left = new StyleLength(screenPos.x - elementRoot.resolvedStyle.width / 2f);
// Set enabled
elementRoot.SetEnabled(true);
} else {
elementRoot.SetEnabled(false);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 092c74123418b7a4482fc45aa5870077
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 5000
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,5 +1,21 @@
using System;
using UnityEngine; using UnityEngine;
public interface ILockOnTarget{
public float lockonTargetRadius { set; }
Transform transform {get;}
GameObject gameObject{ get; }
public Vector3 GetReticlePosition(){
Bounds objectBounds = gameObject.GetComponent<Renderer>().bounds;
Vector3 reticlePosition = new Vector3(transform.position.x, transform.position.y + objectBounds.size.y, transform.position.z);
return reticlePosition;
}
}
public class PlayerCamera : MonoBehaviour{ public class PlayerCamera : MonoBehaviour{
void Start(){ void Start(){

View File

@@ -17,14 +17,14 @@ MonoBehaviour:
m_TargetTexture: {fileID: 0} m_TargetTexture: {fileID: 0}
m_RenderMode: 0 m_RenderMode: 0
m_WorldSpaceLayer: 0 m_WorldSpaceLayer: 0
m_ScaleMode: 1 m_ScaleMode: 0
m_ReferenceSpritePixelsPerUnit: 100 m_ReferenceSpritePixelsPerUnit: 100
m_PixelsPerUnit: 100 m_PixelsPerUnit: 100
m_Scale: 1 m_Scale: 1
m_ReferenceDpi: 96 m_ReferenceDpi: 96
m_FallbackDpi: 96 m_FallbackDpi: 96
m_ReferenceResolution: {x: 1200, y: 800} m_ReferenceResolution: {x: 1920, y: 1080}
m_ScreenMatchMode: 0 m_ScreenMatchMode: 1
m_Match: 0 m_Match: 0
m_SortingOrder: 0 m_SortingOrder: 0
m_TargetDisplay: 0 m_TargetDisplay: 0
@@ -37,7 +37,7 @@ MonoBehaviour:
m_MinAtlasSize: 64 m_MinAtlasSize: 64
m_MaxAtlasSize: 4096 m_MaxAtlasSize: 4096
m_MaxSubTextureSize: 64 m_MaxSubTextureSize: 64
m_ActiveFilters: 31 m_ActiveFilters: -1
m_AtlasBlitShader: {fileID: 9101, guid: 0000000000000000f000000000000000, type: 0} m_AtlasBlitShader: {fileID: 9101, guid: 0000000000000000f000000000000000, type: 0}
m_RuntimeShader: {fileID: 9100, guid: 0000000000000000f000000000000000, type: 0} m_RuntimeShader: {fileID: 9100, guid: 0000000000000000f000000000000000, type: 0}
m_RuntimeWorldShader: {fileID: 9102, guid: 0000000000000000f000000000000000, type: 0} m_RuntimeWorldShader: {fileID: 9102, guid: 0000000000000000f000000000000000, type: 0}