Compare commits
4 Commits
6659b6ee7c
...
0899cfa19e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0899cfa19e | ||
|
|
a971f6f536 | ||
|
|
312d4da6b6 | ||
|
|
ba23cf7489 |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
300
Assets/Scripts/Units/EnvironmentObserver.cs
Normal file
300
Assets/Scripts/Units/EnvironmentObserver.cs
Normal file
@@ -0,0 +1,300 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Drawing;
|
||||||
|
using Sirenix.OdinInspector;
|
||||||
|
using Unity.Mathematics;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class EnvironmentObserver{
|
||||||
|
enum LabelDrawingLocation{
|
||||||
|
PlayerOffset,
|
||||||
|
HitLocation,
|
||||||
|
IntersectingLength,
|
||||||
|
}
|
||||||
|
|
||||||
|
enum ObserverGizmoDrawingCondition{
|
||||||
|
Always,
|
||||||
|
OnlyActive,
|
||||||
|
Never
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum CastType{
|
||||||
|
Ray,
|
||||||
|
BoxOverlap,
|
||||||
|
SphereOverlap,
|
||||||
|
BoxCast,
|
||||||
|
SphereCast
|
||||||
|
}
|
||||||
|
|
||||||
|
[PropertySpace(0, 5), LabelWidth(60)]
|
||||||
|
public string label;
|
||||||
|
[PropertySpace(0, 10), LabelWidth(60)]
|
||||||
|
public CastType castType;
|
||||||
|
|
||||||
|
[Button(ButtonSizes.Large), GUIColor("@GetObserverStatusColorStatic(active, hit)"), PropertyOrder(-1), PropertySpace(5, 5)]
|
||||||
|
public void Active(){
|
||||||
|
active = !active;
|
||||||
|
}
|
||||||
|
|
||||||
|
[HideInInspector]
|
||||||
|
public bool active;
|
||||||
|
|
||||||
|
// Parameters for Cast cast types
|
||||||
|
[FoldoutGroup("Settings")] [HideIf("@castType == CastType.BoxOverlap || castType == CastType.SphereOverlap")]
|
||||||
|
public float length;
|
||||||
|
[FoldoutGroup("Settings")] public Vector3 direction;
|
||||||
|
[FoldoutGroup("Settings")] public Vector3 offset;
|
||||||
|
[PropertySpace(0, 5), FoldoutGroup("Settings")] public LayerMask ignoreLayers = ~0;
|
||||||
|
|
||||||
|
[FoldoutGroup("Settings")] [ShowIf("@castType == CastType.BoxOverlap || castType == CastType.SphereOverlap")]
|
||||||
|
public List<Collider> ignoreObjects = new List<Collider>();
|
||||||
|
|
||||||
|
[FoldoutGroup("Settings")] [ShowIf("@castType == CastType.BoxOverlap || castType == CastType.SphereOverlap")]
|
||||||
|
public bool dontIgnoreSelf;
|
||||||
|
|
||||||
|
[ShowIfGroup("Settings/SpheresOnly", VisibleIf = "@castType == CastType.SphereCast || castType == CastType.SphereOverlap")]
|
||||||
|
[FoldoutGroup("Settings")] public float width;
|
||||||
|
|
||||||
|
// Parameters for Overlap cast types
|
||||||
|
[FoldoutGroup("Settings")]
|
||||||
|
[ShowIfGroup("Settings/BoxesOnly", VisibleIf = "@castType == CastType.BoxCast || castType == CastType.BoxOverlap")]
|
||||||
|
public Vector3 size;
|
||||||
|
|
||||||
|
[ShowIfGroup("Settings/BoxesOnly")]
|
||||||
|
public Vector3 rotation;
|
||||||
|
|
||||||
|
[HideInInspector]
|
||||||
|
public RaycastHit hit;
|
||||||
|
|
||||||
|
[HideInInspector]
|
||||||
|
public Collider[] overlapHits;
|
||||||
|
|
||||||
|
[FoldoutGroup("Text")]
|
||||||
|
[BoxGroup("Text/Label")] public bool drawLabel;
|
||||||
|
[ShowInInspector, SerializeField] [BoxGroup("Text/Label")] LabelDrawingLocation labelTextLocation;
|
||||||
|
[BoxGroup("Text/Label")] public float labelSize;
|
||||||
|
[BoxGroup("Text/Label")] public Vector3 labelLocationOffset;
|
||||||
|
[BoxGroup("Text/Label")] public Vector3 labelRotationOffset;
|
||||||
|
|
||||||
|
[BoxGroup("Text/Hit")] public bool drawHitName;
|
||||||
|
[ShowInInspector, SerializeField] [BoxGroup("Text/Hit")] LabelDrawingLocation hitTextLocation;
|
||||||
|
[BoxGroup("Text/Hit")] public float hitTextSize;
|
||||||
|
[BoxGroup("Text/Hit")] public Vector3 hitLocationOffset;
|
||||||
|
[BoxGroup("Text/Hit")] public Vector3 hitRotationOffset;
|
||||||
|
[FoldoutGroup("Text"), SerializeField, ShowInInspector] ObserverGizmoDrawingCondition gizmoDrawingCondition;
|
||||||
|
|
||||||
|
[SerializeReference, PropertySpace(5, 5)]
|
||||||
|
public List<EnvironmentObserver> children;
|
||||||
|
|
||||||
|
// NOTE: I had a ref for a RaycastHit here that would correspond to hit but idk if it's needed.
|
||||||
|
public bool Evaluate(GameObject source){
|
||||||
|
if (active) {
|
||||||
|
// Remove player's layer from LayerMask.
|
||||||
|
// ignoreLayers <<= source.layer; // TODO: Rework
|
||||||
|
|
||||||
|
// Set some of the variables used later during casting
|
||||||
|
Vector3 relativeStart = source.transform.position + offset;
|
||||||
|
Vector3 relativeStartWithRotation = source.transform.position + source.transform.rotation * offset ;
|
||||||
|
|
||||||
|
switch (castType) {
|
||||||
|
case CastType.Ray:
|
||||||
|
Physics.Raycast(relativeStart, source.transform.rotation * direction, out hit, length, ignoreLayers);
|
||||||
|
break;
|
||||||
|
case CastType.BoxOverlap:
|
||||||
|
// Create original box overlap
|
||||||
|
Collider[] originalOverlap = Physics.OverlapBox(relativeStartWithRotation, size / 2f,
|
||||||
|
source.transform.rotation * Quaternion.Euler(rotation), ignoreLayers);
|
||||||
|
|
||||||
|
// Convert to a list for editing
|
||||||
|
List<Collider> collidersAsList = new List<Collider>();
|
||||||
|
collidersAsList.AddRange(originalOverlap);
|
||||||
|
|
||||||
|
// Remove any specifically specified objects
|
||||||
|
foreach (Collider ignoredObject in ignoreObjects) {
|
||||||
|
if (collidersAsList.Contains(ignoredObject)) {
|
||||||
|
collidersAsList.Remove(ignoredObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove the source but only if requested
|
||||||
|
if (!dontIgnoreSelf) {
|
||||||
|
if (collidersAsList.Contains(source.GetComponent<Collider>())) {
|
||||||
|
collidersAsList.Remove(source.GetComponent<Collider>());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Send back to an array and done
|
||||||
|
overlapHits = collidersAsList.ToArray();
|
||||||
|
|
||||||
|
if (overlapHits.Length > 0) {
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
break;
|
||||||
|
case CastType.SphereOverlap:
|
||||||
|
break;
|
||||||
|
case CastType.BoxCast:
|
||||||
|
// TODO: Make this not an if statement. Check that it works with NodeCanvas first
|
||||||
|
if (Physics.BoxCast(relativeStartWithRotation, size / 2f,
|
||||||
|
source.transform.rotation * Quaternion.Euler(rotation) * direction,
|
||||||
|
out hit, source.transform.rotation * Quaternion.Euler(rotation), length,
|
||||||
|
ignoreLayers)
|
||||||
|
) {
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case CastType.SphereCast:
|
||||||
|
// TODO: Make this not an if statement. Check that it works with NodeCanvas first
|
||||||
|
if (Physics.SphereCast(relativeStartWithRotation, width / 2f,
|
||||||
|
source.transform.rotation * Quaternion.Euler(rotation) * direction,
|
||||||
|
out hit, length,
|
||||||
|
ignoreLayers)
|
||||||
|
) {
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hit.transform != null) {
|
||||||
|
IInteractable interactable = hit.transform.GetComponent<IInteractable>();
|
||||||
|
if (interactable != null && interactable.CanInteract()) {
|
||||||
|
hit.transform.GetComponent<IInteractable>().OnObserverDetected(this);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DrawObserverGizmo(GameObject source, bool drawAnyways = false){
|
||||||
|
if (!drawAnyways){
|
||||||
|
if (gizmoDrawingCondition == ObserverGizmoDrawingCondition.Never || (gizmoDrawingCondition == ObserverGizmoDrawingCondition.OnlyActive ! & active)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Vector3 relativeStart = source.transform.position + offset;
|
||||||
|
Vector3 relativeStartWithRotation = source.transform.position + source.transform.rotation * (offset);
|
||||||
|
|
||||||
|
// Setup the variables for boxcast, spherecast, etc
|
||||||
|
// Create an offset start point for the center of the wirebox, since gizmos are drawn with their pivot in the center.
|
||||||
|
Vector3 offsetWithRotationAndLength;
|
||||||
|
if (direction == Vector3.zero) {
|
||||||
|
offsetWithRotationAndLength = Quaternion.Euler(rotation) * (Vector3.forward * (length / 2));
|
||||||
|
} else {
|
||||||
|
offsetWithRotationAndLength = Quaternion.LookRotation(direction) * Quaternion.Euler(rotation) * (Vector3.forward * (length / 2));
|
||||||
|
}
|
||||||
|
|
||||||
|
Vector3 offsetFromCenter = relativeStartWithRotation + source.transform.rotation * offsetWithRotationAndLength;
|
||||||
|
|
||||||
|
// Also create a rotation for use with the gizmos. Mainly just to shorten the lines
|
||||||
|
Quaternion gizmosRotation;
|
||||||
|
|
||||||
|
if (direction == Vector3.zero) {
|
||||||
|
gizmosRotation = source.transform.rotation * Quaternion.Euler(rotation);
|
||||||
|
} else {
|
||||||
|
gizmosRotation = source.transform.rotation * Quaternion.LookRotation(direction) * Quaternion.Euler(rotation);
|
||||||
|
}
|
||||||
|
|
||||||
|
Color gizmoColor = Evaluate(source) ? Color.green : Color.red;
|
||||||
|
gizmoColor = active ? gizmoColor : Color.gray;
|
||||||
|
|
||||||
|
using (Draw.ingame.WithColor(gizmoColor)){
|
||||||
|
switch (castType) {
|
||||||
|
case CastType.Ray:
|
||||||
|
Draw.ingame.Line(relativeStart, relativeStart + (source.transform.rotation * direction.normalized) * length);
|
||||||
|
break;
|
||||||
|
case CastType.BoxOverlap:
|
||||||
|
Draw.ingame.WireBox(relativeStartWithRotation, source.transform.rotation * Quaternion.Euler(rotation), size);
|
||||||
|
break;
|
||||||
|
case CastType.SphereCast:
|
||||||
|
Draw.ingame.SolidCircle(relativeStartWithRotation, relativeStartWithRotation - Camera.main.transform.position, width * 1, gizmoColor.Alpha(.5f));
|
||||||
|
Draw.ingame.WireCapsule(relativeStartWithRotation, relativeStartWithRotation + gizmosRotation * (Vector3.forward * (length - width / 2)), width);
|
||||||
|
break;
|
||||||
|
case CastType.BoxCast:
|
||||||
|
// Draw the gizmos for the boxcast
|
||||||
|
Draw.ingame.WireBox(offsetFromCenter, gizmosRotation, new float3(size.x, size.y, length));
|
||||||
|
Draw.ingame.SolidBox(relativeStartWithRotation, gizmosRotation, size, gizmoColor.Alpha(.1f));
|
||||||
|
|
||||||
|
Draw.ingame.WireBox(relativeStartWithRotation, gizmosRotation, size);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new ArgumentOutOfRangeException();
|
||||||
|
}
|
||||||
|
|
||||||
|
Draw.ingame.SolidCircle(relativeStartWithRotation, relativeStartWithRotation - Camera.main.transform.position, .4f);
|
||||||
|
Draw.ingame.SolidCircle(hit.point, hit.point - Camera.main.transform.position, .4f);
|
||||||
|
|
||||||
|
// Set up variables for label (not hit name)
|
||||||
|
Vector3 labelStartPos = Vector3.zero;
|
||||||
|
switch (labelTextLocation) {
|
||||||
|
case LabelDrawingLocation.PlayerOffset:
|
||||||
|
labelStartPos = source.transform.position;
|
||||||
|
break;
|
||||||
|
case LabelDrawingLocation.IntersectingLength:
|
||||||
|
labelStartPos = offsetFromCenter;
|
||||||
|
break;
|
||||||
|
case LabelDrawingLocation.HitLocation:{
|
||||||
|
if (hit.transform != null) {
|
||||||
|
labelStartPos = hit.point;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw label
|
||||||
|
if (drawLabel) {
|
||||||
|
Draw.ingame.Label3D(
|
||||||
|
labelStartPos + labelLocationOffset,
|
||||||
|
gizmosRotation * Quaternion.Euler(labelRotationOffset),
|
||||||
|
label,
|
||||||
|
labelSize,
|
||||||
|
LabelAlignment.MiddleLeft,
|
||||||
|
gizmoColor
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set up variables for hit name
|
||||||
|
// Since the label is already drawn just use the previous startPos
|
||||||
|
switch (labelTextLocation) {
|
||||||
|
case LabelDrawingLocation.PlayerOffset:
|
||||||
|
labelStartPos = source.transform.position;
|
||||||
|
break;
|
||||||
|
case LabelDrawingLocation.IntersectingLength:
|
||||||
|
labelStartPos = offsetFromCenter;
|
||||||
|
break;
|
||||||
|
case LabelDrawingLocation.HitLocation:{
|
||||||
|
if (hit.transform != null) {
|
||||||
|
labelStartPos = hit.point;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw hitname
|
||||||
|
if (drawLabel) {
|
||||||
|
Draw.ingame.Label3D(
|
||||||
|
labelStartPos + labelLocationOffset,
|
||||||
|
gizmosRotation * Quaternion.Euler(labelRotationOffset),
|
||||||
|
label,
|
||||||
|
hitTextSize,
|
||||||
|
LabelAlignment.MiddleLeft,
|
||||||
|
gizmoColor
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static Color GetObserverStatusColorStatic(bool active, RaycastHit hit){
|
||||||
|
if (active) {
|
||||||
|
if (hit.Equals(default(RaycastHit))) {
|
||||||
|
return Color.green;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Color.red;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Color.gray;
|
||||||
|
}
|
||||||
|
}
|
||||||
3
Assets/Scripts/Units/EnvironmentObserver.cs.meta
Normal file
3
Assets/Scripts/Units/EnvironmentObserver.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0aad4dcbee894497b63c2954e0961e7b
|
||||||
|
timeCreated: 1765311249
|
||||||
49
Assets/Scripts/Units/ILockOnTarget.cs
Normal file
49
Assets/Scripts/Units/ILockOnTarget.cs
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Reset.Units{
|
||||||
|
public interface ILockOnTarget{
|
||||||
|
public float lockonTargetRadius{ set; get; }
|
||||||
|
public bool lockonDebug{ set; get; }
|
||||||
|
|
||||||
|
public float lockonRaycastVerticalOffset{ set; get; }
|
||||||
|
|
||||||
|
Transform transform{ get; }
|
||||||
|
GameObject gameObject{ get; }
|
||||||
|
|
||||||
|
abstract void OnTargetDelete();
|
||||||
|
|
||||||
|
void Help(){
|
||||||
|
SafelyDeleteTarget();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Vector3 GetReticlePosition(){
|
||||||
|
float upValue = 0f;
|
||||||
|
|
||||||
|
if (gameObject.GetComponent<Renderer>()) {
|
||||||
|
Bounds objectBounds = gameObject.GetComponent<Renderer>().bounds;
|
||||||
|
upValue = objectBounds.size.y;
|
||||||
|
upValue = 4f;
|
||||||
|
}
|
||||||
|
|
||||||
|
Vector3 reticlePosition =
|
||||||
|
new Vector3(transform.position.x, transform.position.y + upValue, transform.position.z);
|
||||||
|
|
||||||
|
return reticlePosition;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SafelyDeleteTarget(){
|
||||||
|
// gameObject.
|
||||||
|
foreach (LockOnManager.ActiveLockOnTarget target in LockOnManager.Instance.activeTargets) {
|
||||||
|
if (target.gameObject == this.gameObject) {
|
||||||
|
GameObject clone = new GameObject
|
||||||
|
{ name = $"Target Clone of {gameObject.name}", transform = { position = transform.position } };
|
||||||
|
|
||||||
|
target.gameObject = clone;
|
||||||
|
target.cinemachineTarget.Object = clone.transform;
|
||||||
|
|
||||||
|
LockOnManager.Instance.QueueTargetRemoval(clone, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
3
Assets/Scripts/Units/ILockOnTarget.cs.meta
Normal file
3
Assets/Scripts/Units/ILockOnTarget.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3cf599680bc840b59ee6ea3cd0114ab8
|
||||||
|
timeCreated: 1765311171
|
||||||
@@ -1,54 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Reset.Units{
|
|
||||||
public interface ILockOnTarget{
|
|
||||||
public float lockonTargetRadius{ set; get; }
|
|
||||||
public bool lockonDebug{ set; get; }
|
|
||||||
|
|
||||||
public float lockonRaycastVerticalOffset{ set; get; }
|
|
||||||
|
|
||||||
Transform transform{ get; }
|
|
||||||
GameObject gameObject{ get; }
|
|
||||||
|
|
||||||
abstract void OnTargetDelete();
|
|
||||||
|
|
||||||
void Help(){
|
|
||||||
SafelyDeleteTarget();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Vector3 GetReticlePosition(){
|
|
||||||
float upValue = 0f;
|
|
||||||
|
|
||||||
if (gameObject.GetComponent<Renderer>()) {
|
|
||||||
Bounds objectBounds = gameObject.GetComponent<Renderer>().bounds;
|
|
||||||
upValue = objectBounds.size.y;
|
|
||||||
upValue = 4f;
|
|
||||||
}
|
|
||||||
|
|
||||||
Vector3 reticlePosition =
|
|
||||||
new Vector3(transform.position.x, transform.position.y + upValue, transform.position.z);
|
|
||||||
|
|
||||||
return reticlePosition;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SafelyDeleteTarget(){
|
|
||||||
// gameObject.
|
|
||||||
foreach (LockOnManager.ActiveLockOnTarget target in LockOnManager.Instance.activeTargets) {
|
|
||||||
if (target.gameObject == this.gameObject) {
|
|
||||||
GameObject clone = new GameObject
|
|
||||||
{ name = $"Target Clone of {gameObject.name}", transform = { position = transform.position } };
|
|
||||||
|
|
||||||
target.gameObject = clone;
|
|
||||||
target.cinemachineTarget.Object = clone.transform;
|
|
||||||
|
|
||||||
LockOnManager.Instance.QueueTargetRemoval(clone, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class PlayerCamera : MonoBehaviour{
|
public class PlayerCamera : MonoBehaviour{
|
||||||
void Start(){
|
void Start(){
|
||||||
|
|
||||||
|
|||||||
@@ -1,306 +1,8 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Drawing;
|
|
||||||
using Sirenix.OdinInspector;
|
|
||||||
using Sirenix.Serialization;
|
using Sirenix.Serialization;
|
||||||
using Unity.Mathematics;
|
|
||||||
using UnityEngine.Serialization;
|
using UnityEngine.Serialization;
|
||||||
|
|
||||||
[Serializable]
|
|
||||||
public class EnvironmentObserver{
|
|
||||||
enum LabelDrawingLocation{
|
|
||||||
PlayerOffset,
|
|
||||||
HitLocation,
|
|
||||||
IntersectingLength,
|
|
||||||
}
|
|
||||||
|
|
||||||
enum ObserverGizmoDrawingCondition{
|
|
||||||
Always,
|
|
||||||
OnlyActive,
|
|
||||||
Never
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum CastType{
|
|
||||||
Ray,
|
|
||||||
BoxOverlap,
|
|
||||||
SphereOverlap,
|
|
||||||
BoxCast,
|
|
||||||
SphereCast
|
|
||||||
}
|
|
||||||
|
|
||||||
[PropertySpace(0, 5), LabelWidth(60)]
|
|
||||||
public string label;
|
|
||||||
[PropertySpace(0, 10), LabelWidth(60)]
|
|
||||||
public CastType castType;
|
|
||||||
|
|
||||||
[Button(ButtonSizes.Large), GUIColor("@GetObserverStatusColorStatic(active, hit)"), PropertyOrder(-1), PropertySpace(5, 5)]
|
|
||||||
public void Active(){
|
|
||||||
active = !active;
|
|
||||||
}
|
|
||||||
|
|
||||||
[HideInInspector]
|
|
||||||
public bool active;
|
|
||||||
|
|
||||||
// Parameters for Cast cast types
|
|
||||||
[FoldoutGroup("Settings")] [HideIf("@castType == CastType.BoxOverlap || castType == CastType.SphereOverlap")]
|
|
||||||
public float length;
|
|
||||||
[FoldoutGroup("Settings")] public Vector3 direction;
|
|
||||||
[FoldoutGroup("Settings")] public Vector3 offset;
|
|
||||||
[PropertySpace(0, 5), FoldoutGroup("Settings")] public LayerMask ignoreLayers = ~0;
|
|
||||||
|
|
||||||
[FoldoutGroup("Settings")] [ShowIf("@castType == CastType.BoxOverlap || castType == CastType.SphereOverlap")]
|
|
||||||
public List<Collider> ignoreObjects = new List<Collider>();
|
|
||||||
|
|
||||||
[FoldoutGroup("Settings")] [ShowIf("@castType == CastType.BoxOverlap || castType == CastType.SphereOverlap")]
|
|
||||||
public bool dontIgnoreSelf;
|
|
||||||
|
|
||||||
[ShowIfGroup("Settings/SpheresOnly", VisibleIf = "@castType == CastType.SphereCast || castType == CastType.SphereOverlap")]
|
|
||||||
[FoldoutGroup("Settings")] public float width;
|
|
||||||
|
|
||||||
// Parameters for Overlap cast types
|
|
||||||
[FoldoutGroup("Settings")]
|
|
||||||
[ShowIfGroup("Settings/BoxesOnly", VisibleIf = "@castType == CastType.BoxCast || castType == CastType.BoxOverlap")]
|
|
||||||
public Vector3 size;
|
|
||||||
|
|
||||||
[ShowIfGroup("Settings/BoxesOnly")]
|
|
||||||
public Vector3 rotation;
|
|
||||||
|
|
||||||
[HideInInspector]
|
|
||||||
public RaycastHit hit;
|
|
||||||
|
|
||||||
[HideInInspector]
|
|
||||||
public Collider[] overlapHits;
|
|
||||||
|
|
||||||
[FoldoutGroup("Text")]
|
|
||||||
[BoxGroup("Text/Label")] public bool drawLabel;
|
|
||||||
[ShowInInspector, SerializeField] [BoxGroup("Text/Label")] LabelDrawingLocation labelTextLocation;
|
|
||||||
[BoxGroup("Text/Label")] public float labelSize;
|
|
||||||
[BoxGroup("Text/Label")] public Vector3 labelLocationOffset;
|
|
||||||
[BoxGroup("Text/Label")] public Vector3 labelRotationOffset;
|
|
||||||
|
|
||||||
[BoxGroup("Text/Hit")] public bool drawHitName;
|
|
||||||
[ShowInInspector, SerializeField] [BoxGroup("Text/Hit")] LabelDrawingLocation hitTextLocation;
|
|
||||||
[BoxGroup("Text/Hit")] public float hitTextSize;
|
|
||||||
[BoxGroup("Text/Hit")] public Vector3 hitLocationOffset;
|
|
||||||
[BoxGroup("Text/Hit")] public Vector3 hitRotationOffset;
|
|
||||||
[FoldoutGroup("Text"), SerializeField, ShowInInspector] ObserverGizmoDrawingCondition gizmoDrawingCondition;
|
|
||||||
|
|
||||||
[SerializeReference, PropertySpace(5, 5)]
|
|
||||||
public List<EnvironmentObserver> children;
|
|
||||||
|
|
||||||
// NOTE: I had a ref for a RaycastHit here that would correspond to hit but idk if it's needed.
|
|
||||||
public bool Evaluate(GameObject source){
|
|
||||||
if (active) {
|
|
||||||
// Remove player's layer from LayerMask.
|
|
||||||
// ignoreLayers <<= source.layer; // TODO: Rework
|
|
||||||
|
|
||||||
// Set some of the variables used later during casting
|
|
||||||
Vector3 relativeStart = source.transform.position + offset;
|
|
||||||
Vector3 relativeStartWithRotation = source.transform.position + source.transform.rotation * offset ;
|
|
||||||
|
|
||||||
switch (castType) {
|
|
||||||
case CastType.Ray:
|
|
||||||
Physics.Raycast(relativeStart, source.transform.rotation * direction, out hit, length, ignoreLayers);
|
|
||||||
break;
|
|
||||||
case CastType.BoxOverlap:
|
|
||||||
// Create original box overlap
|
|
||||||
Collider[] originalOverlap = Physics.OverlapBox(relativeStartWithRotation, size / 2f,
|
|
||||||
source.transform.rotation * Quaternion.Euler(rotation), ignoreLayers);
|
|
||||||
|
|
||||||
// Convert to a list for editing
|
|
||||||
List<Collider> collidersAsList = new List<Collider>();
|
|
||||||
collidersAsList.AddRange(originalOverlap);
|
|
||||||
|
|
||||||
// Remove any specifically specified objects
|
|
||||||
foreach (Collider ignoredObject in ignoreObjects) {
|
|
||||||
if (collidersAsList.Contains(ignoredObject)) {
|
|
||||||
collidersAsList.Remove(ignoredObject);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Remove the source but only if requested
|
|
||||||
if (!dontIgnoreSelf) {
|
|
||||||
if (collidersAsList.Contains(source.GetComponent<Collider>())) {
|
|
||||||
collidersAsList.Remove(source.GetComponent<Collider>());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Send back to an array and done
|
|
||||||
overlapHits = collidersAsList.ToArray();
|
|
||||||
|
|
||||||
if (overlapHits.Length > 0) {
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
|
|
||||||
break;
|
|
||||||
case CastType.SphereOverlap:
|
|
||||||
break;
|
|
||||||
case CastType.BoxCast:
|
|
||||||
// TODO: Make this not an if statement. Check that it works with NodeCanvas first
|
|
||||||
if (Physics.BoxCast(relativeStartWithRotation, size / 2f,
|
|
||||||
source.transform.rotation * Quaternion.Euler(rotation) * direction,
|
|
||||||
out hit, source.transform.rotation * Quaternion.Euler(rotation), length,
|
|
||||||
ignoreLayers)
|
|
||||||
) {
|
|
||||||
};
|
|
||||||
break;
|
|
||||||
case CastType.SphereCast:
|
|
||||||
// TODO: Make this not an if statement. Check that it works with NodeCanvas first
|
|
||||||
if (Physics.SphereCast(relativeStartWithRotation, width / 2f,
|
|
||||||
source.transform.rotation * Quaternion.Euler(rotation) * direction,
|
|
||||||
out hit, length,
|
|
||||||
ignoreLayers)
|
|
||||||
) {
|
|
||||||
};
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (hit.transform != null) {
|
|
||||||
IInteractable interactable = hit.transform.GetComponent<IInteractable>();
|
|
||||||
if (interactable != null && interactable.CanInteract()) {
|
|
||||||
hit.transform.GetComponent<IInteractable>().OnObserverDetected(this);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void DrawObserverGizmo(GameObject source, bool drawAnyways = false){
|
|
||||||
if (!drawAnyways){
|
|
||||||
if (gizmoDrawingCondition == ObserverGizmoDrawingCondition.Never || (gizmoDrawingCondition == ObserverGizmoDrawingCondition.OnlyActive ! & active)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Vector3 relativeStart = source.transform.position + offset;
|
|
||||||
Vector3 relativeStartWithRotation = source.transform.position + source.transform.rotation * (offset);
|
|
||||||
|
|
||||||
// Setup the variables for boxcast, spherecast, etc
|
|
||||||
// Create an offset start point for the center of the wirebox, since gizmos are drawn with their pivot in the center.
|
|
||||||
Vector3 offsetWithRotationAndLength;
|
|
||||||
if (direction == Vector3.zero) {
|
|
||||||
offsetWithRotationAndLength = Quaternion.Euler(rotation) * (Vector3.forward * (length / 2));
|
|
||||||
} else {
|
|
||||||
offsetWithRotationAndLength = Quaternion.LookRotation(direction) * Quaternion.Euler(rotation) * (Vector3.forward * (length / 2));
|
|
||||||
}
|
|
||||||
|
|
||||||
Vector3 offsetFromCenter = relativeStartWithRotation + source.transform.rotation * offsetWithRotationAndLength;
|
|
||||||
|
|
||||||
// Also create a rotation for use with the gizmos. Mainly just to shorten the lines
|
|
||||||
Quaternion gizmosRotation;
|
|
||||||
|
|
||||||
if (direction == Vector3.zero) {
|
|
||||||
gizmosRotation = source.transform.rotation * Quaternion.Euler(rotation);
|
|
||||||
} else {
|
|
||||||
gizmosRotation = source.transform.rotation * Quaternion.LookRotation(direction) * Quaternion.Euler(rotation);
|
|
||||||
}
|
|
||||||
|
|
||||||
Color gizmoColor = Evaluate(source) ? Color.green : Color.red;
|
|
||||||
gizmoColor = active ? gizmoColor : Color.gray;
|
|
||||||
|
|
||||||
using (Draw.ingame.WithColor(gizmoColor)){
|
|
||||||
switch (castType) {
|
|
||||||
case CastType.Ray:
|
|
||||||
Draw.ingame.Line(relativeStart, relativeStart + (source.transform.rotation * direction.normalized) * length);
|
|
||||||
break;
|
|
||||||
case CastType.BoxOverlap:
|
|
||||||
Draw.ingame.WireBox(relativeStartWithRotation, source.transform.rotation * Quaternion.Euler(rotation), size);
|
|
||||||
break;
|
|
||||||
case CastType.SphereCast:
|
|
||||||
Draw.ingame.SolidCircle(relativeStartWithRotation, relativeStartWithRotation - Camera.main.transform.position, width * 1, gizmoColor.Alpha(.5f));
|
|
||||||
Draw.ingame.WireCapsule(relativeStartWithRotation, relativeStartWithRotation + gizmosRotation * (Vector3.forward * (length - width / 2)), width);
|
|
||||||
break;
|
|
||||||
case CastType.BoxCast:
|
|
||||||
// Draw the gizmos for the boxcast
|
|
||||||
Draw.ingame.WireBox(offsetFromCenter, gizmosRotation, new float3(size.x, size.y, length));
|
|
||||||
Draw.ingame.SolidBox(relativeStartWithRotation, gizmosRotation, size, gizmoColor.Alpha(.1f));
|
|
||||||
|
|
||||||
Draw.ingame.WireBox(relativeStartWithRotation, gizmosRotation, size);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
throw new ArgumentOutOfRangeException();
|
|
||||||
}
|
|
||||||
|
|
||||||
Draw.ingame.SolidCircle(relativeStartWithRotation, relativeStartWithRotation - Camera.main.transform.position, .4f);
|
|
||||||
Draw.ingame.SolidCircle(hit.point, hit.point - Camera.main.transform.position, .4f);
|
|
||||||
|
|
||||||
// Set up variables for label (not hit name)
|
|
||||||
Vector3 labelStartPos = Vector3.zero;
|
|
||||||
switch (labelTextLocation) {
|
|
||||||
case LabelDrawingLocation.PlayerOffset:
|
|
||||||
labelStartPos = source.transform.position;
|
|
||||||
break;
|
|
||||||
case LabelDrawingLocation.IntersectingLength:
|
|
||||||
labelStartPos = offsetFromCenter;
|
|
||||||
break;
|
|
||||||
case LabelDrawingLocation.HitLocation:{
|
|
||||||
if (hit.transform != null) {
|
|
||||||
labelStartPos = hit.point;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Draw label
|
|
||||||
if (drawLabel) {
|
|
||||||
Draw.ingame.Label3D(
|
|
||||||
labelStartPos + labelLocationOffset,
|
|
||||||
gizmosRotation * Quaternion.Euler(labelRotationOffset),
|
|
||||||
label,
|
|
||||||
labelSize,
|
|
||||||
LabelAlignment.MiddleLeft,
|
|
||||||
gizmoColor
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set up variables for hit name
|
|
||||||
// Since the label is already drawn just use the previous startPos
|
|
||||||
switch (labelTextLocation) {
|
|
||||||
case LabelDrawingLocation.PlayerOffset:
|
|
||||||
labelStartPos = source.transform.position;
|
|
||||||
break;
|
|
||||||
case LabelDrawingLocation.IntersectingLength:
|
|
||||||
labelStartPos = offsetFromCenter;
|
|
||||||
break;
|
|
||||||
case LabelDrawingLocation.HitLocation:{
|
|
||||||
if (hit.transform != null) {
|
|
||||||
labelStartPos = hit.point;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Draw hitname
|
|
||||||
if (drawLabel) {
|
|
||||||
Draw.ingame.Label3D(
|
|
||||||
labelStartPos + labelLocationOffset,
|
|
||||||
gizmosRotation * Quaternion.Euler(labelRotationOffset),
|
|
||||||
label,
|
|
||||||
hitTextSize,
|
|
||||||
LabelAlignment.MiddleLeft,
|
|
||||||
gizmoColor
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static Color GetObserverStatusColorStatic(bool active, RaycastHit hit){
|
|
||||||
if (active) {
|
|
||||||
if (hit.Equals(default(RaycastHit))) {
|
|
||||||
return Color.green;
|
|
||||||
}
|
|
||||||
|
|
||||||
return Color.red;
|
|
||||||
}
|
|
||||||
|
|
||||||
return Color.gray;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class PlayerEnvironmentManager : MonoBehaviour{
|
public class PlayerEnvironmentManager : MonoBehaviour{
|
||||||
[OdinSerialize]
|
[OdinSerialize]
|
||||||
public List<EnvironmentObserver> observers;
|
public List<EnvironmentObserver> observers;
|
||||||
|
|||||||
@@ -14,6 +14,29 @@
|
|||||||
"com.unity.ugui": "1.0.0"
|
"com.unity.ugui": "1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"com.arongranberg.astar": {
|
||||||
|
"version": "file:com.arongranberg.astar",
|
||||||
|
"depth": 0,
|
||||||
|
"source": "embedded",
|
||||||
|
"dependencies": {
|
||||||
|
"com.unity.burst": "1.8.7",
|
||||||
|
"com.unity.collections": "1.5.1",
|
||||||
|
"com.unity.mathematics": "1.2.6",
|
||||||
|
"com.unity.modules.animation": "1.0.0",
|
||||||
|
"com.unity.modules.assetbundle": "1.0.0",
|
||||||
|
"com.unity.modules.audio": "1.0.0",
|
||||||
|
"com.unity.modules.imgui": "1.0.0",
|
||||||
|
"com.unity.modules.particlesystem": "1.0.0",
|
||||||
|
"com.unity.modules.physics": "1.0.0",
|
||||||
|
"com.unity.modules.physics2d": "1.0.0",
|
||||||
|
"com.unity.modules.terrain": "1.0.0",
|
||||||
|
"com.unity.modules.terrainphysics": "1.0.0",
|
||||||
|
"com.unity.modules.tilemap": "1.0.0",
|
||||||
|
"com.unity.modules.ui": "1.0.0",
|
||||||
|
"com.unity.modules.uielements": "1.0.0",
|
||||||
|
"com.unity.ugui": "1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"com.singularitygroup.hotreload": {
|
"com.singularitygroup.hotreload": {
|
||||||
"version": "file:com.singularitygroup.hotreload",
|
"version": "file:com.singularitygroup.hotreload",
|
||||||
"depth": 0,
|
"depth": 0,
|
||||||
|
|||||||
@@ -21,6 +21,11 @@
|
|||||||
"key": "editor.materialPalettePath",
|
"key": "editor.materialPalettePath",
|
||||||
"value": "{\"m_Value\":\"Assets/ProBuilder Data/Default Material Palette.asset\"}"
|
"value": "{\"m_Value\":\"Assets/ProBuilder Data/Default Material Palette.asset\"}"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
|
||||||
|
"key": "VertexColorPalette.previousColorPalette",
|
||||||
|
"value": "{\"m_Value\":\"Assets/Map/Materials/BuildingsColor.asset\"}"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "UnityEngine.ProBuilder.SemVer, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
"type": "UnityEngine.ProBuilder.SemVer, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
"key": "about.identifier",
|
"key": "about.identifier",
|
||||||
@@ -129,13 +134,23 @@
|
|||||||
{
|
{
|
||||||
"type": "UnityEngine.Vector3, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
"type": "UnityEngine.Vector3, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
"key": "ShapeBuilder.LastSize.Cube",
|
"key": "ShapeBuilder.LastSize.Cube",
|
||||||
"value": "{\"m_Value\":{\"x\":20.036033630371095,\"y\":1.0208016633987427,\"z\":-17.9393310546875}}"
|
"value": "{\"m_Value\":{\"x\":1.0,\"y\":15.0,\"z\":1.0}}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "UnityEngine.Vector3, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
"type": "UnityEngine.Vector3, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
"key": "ShapeBuilder.LastSize.Stairs",
|
"key": "ShapeBuilder.LastSize.Stairs",
|
||||||
"value": "{\"m_Value\":{\"x\":-7.032182693481445,\"y\":2.840894937515259,\"z\":-7.309409141540527}}"
|
"value": "{\"m_Value\":{\"x\":-7.032182693481445,\"y\":2.840894937515259,\"z\":-7.309409141540527}}"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "UnityEngine.Vector3, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
|
"key": "ShapeBuilder.LastSize.Prism",
|
||||||
|
"value": "{\"m_Value\":{\"x\":-17.4999942779541,\"y\":9.000001907348633,\"z\":9.0}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "UnityEngine.Vector3, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
|
"key": "ShapeBuilder.LastSize.Plane",
|
||||||
|
"value": "{\"m_Value\":{\"x\":-1.0,\"y\":0.0,\"z\":7.0}}"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "UnityEngine.Quaternion, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
"type": "UnityEngine.Quaternion, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
"key": "ShapeBuilder.LastRotation.Cube",
|
"key": "ShapeBuilder.LastRotation.Cube",
|
||||||
@@ -146,6 +161,16 @@
|
|||||||
"key": "ShapeBuilder.LastRotation.Stairs",
|
"key": "ShapeBuilder.LastRotation.Stairs",
|
||||||
"value": "{\"m_Value\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0}}"
|
"value": "{\"m_Value\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0}}"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "UnityEngine.Quaternion, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
|
"key": "ShapeBuilder.LastRotation.Prism",
|
||||||
|
"value": "{\"m_Value\":{\"x\":0.0,\"y\":0.0,\"z\":-0.7071067690849304,\"w\":0.7071067690849304}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "UnityEngine.Quaternion, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
|
"key": "ShapeBuilder.LastRotation.Plane",
|
||||||
|
"value": "{\"m_Value\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0}}"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "UnityEngine.ProBuilder.PivotLocation, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
"type": "UnityEngine.ProBuilder.PivotLocation, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
"key": "ShapeBuilder.PivotLocation.Cube",
|
"key": "ShapeBuilder.PivotLocation.Cube",
|
||||||
@@ -156,6 +181,16 @@
|
|||||||
"key": "ShapeBuilder.PivotLocation.Stairs",
|
"key": "ShapeBuilder.PivotLocation.Stairs",
|
||||||
"value": "{\"m_Value\":0}"
|
"value": "{\"m_Value\":0}"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "UnityEngine.ProBuilder.PivotLocation, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
|
"key": "ShapeBuilder.PivotLocation.Prism",
|
||||||
|
"value": "{\"m_Value\":0}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "UnityEngine.ProBuilder.PivotLocation, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
|
"key": "ShapeBuilder.PivotLocation.Plane",
|
||||||
|
"value": "{\"m_Value\":0}"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "UnityEngine.ProBuilder.Shapes.Shape, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
"type": "UnityEngine.ProBuilder.Shapes.Shape, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
"key": "ShapeBuilder.Cube",
|
"key": "ShapeBuilder.Cube",
|
||||||
@@ -166,10 +201,20 @@
|
|||||||
"key": "ShapeBuilder.Stairs",
|
"key": "ShapeBuilder.Stairs",
|
||||||
"value": "{}"
|
"value": "{}"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "UnityEngine.ProBuilder.Shapes.Shape, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
|
"key": "ShapeBuilder.Prism",
|
||||||
|
"value": "{}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "UnityEngine.ProBuilder.Shapes.Shape, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
|
"key": "ShapeBuilder.Plane",
|
||||||
|
"value": "{}"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "UnityEngine.ProBuilder.SelectMode, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
"type": "UnityEngine.ProBuilder.SelectMode, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
"key": "s_SelectMode",
|
"key": "s_SelectMode",
|
||||||
"value": "{\"m_Value\":1}"
|
"value": "{\"m_Value\":2}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "UnityEngine.ProBuilder.RectSelectMode, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
"type": "UnityEngine.ProBuilder.RectSelectMode, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
@@ -185,6 +230,16 @@
|
|||||||
"type": "System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
|
"type": "System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
|
||||||
"key": "uv.uvEditorGridSnapIncrement",
|
"key": "uv.uvEditorGridSnapIncrement",
|
||||||
"value": "{\"m_Value\":0.125}"
|
"value": "{\"m_Value\":0.125}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
|
||||||
|
"key": "ExtrudeFaces.distance",
|
||||||
|
"value": "{\"m_Value\":0.5}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "UnityEngine.ProBuilder.ExtrudeMethod, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
|
"key": "editor.extrudeMethod",
|
||||||
|
"value": "{\"m_Value\":2}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
15
ProjectSettings/com.arongranberg.astar/settings.asset
Normal file
15
ProjectSettings/com.arongranberg.astar/settings.asset
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &1
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 53
|
||||||
|
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: 21f007d651ef4ab42b597f1da9ad75cf, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier: AstarPathfindingProjectEditor::Pathfinding.PathfindingEditorSettings
|
||||||
|
hasShownWelcomeScreen: 1
|
||||||
Reference in New Issue
Block a user