maint: created new scene for demoing. cleaned up errors.

This commit is contained in:
Chris
2025-08-31 15:36:10 -04:00
parent 170a08355c
commit 5924479307
19 changed files with 4388 additions and 63265 deletions

View File

@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using UnityEngine;
namespace Reset{
public static class GameManager{
public static GameObject UI;
public static GameObject Camera;
public static GameObject Input;
[RuntimeInitializeOnLoadMethodAttribute]
static void PopulateSceneReferences(){
try {
UI = GameObject.Find("UICanvas");
Camera = GameObject.Find("CameraGroup");
Input = GameObject.Find("InputManager");
} catch (Exception e) {
Console.WriteLine(e);
throw;
}
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 4177414f9e5aa034986c58a118aeb2d7

View File

@@ -2,6 +2,7 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Numerics;
using Reset;
using Sirenix.OdinInspector;
using Unity.Cinemachine;
using UnityEngine;
@@ -52,6 +53,14 @@ public class LockOnManager : MonoBehaviour{
this.enabled = false;
return;
}
// References from camera
targetGroup = GameManager.Camera.transform.Find("Target Group").GetComponent<CinemachineTargetGroup>();
lockOnDocument = GameManager.UI.transform.Find("Lock On").GetComponent<UIDocument>();
// Set the camera's target as the player
targetGroup.Targets.Add(new CinemachineTargetGroup.Target{Object = transform, Radius = 3.5f, Weight = 1f});
GameManager.Camera.transform.Find("Cinemachine").GetComponent<CinemachineCamera>().Target.TrackingTarget = transform;
// Quick check for things in lock-on target that aren't lock-onable
if (mainTarget != null && mainTarget.gameObject.GetComponent<ILockOnTarget>() == null) {

View File

@@ -49,10 +49,15 @@ namespace Reset.Core.Tools{
Destroy(this);
}
Instance = this;
}
void Start(){
canvasRootGameObject = GameManager.UI;
root = canvasRootGameObject.transform.Find("Debug Overlay").GetComponent<UIDocument>();
SetCurrentPageVisible();
Debug.Log(valueTemplate.Instantiate().resolvedStyle.backgroundColor);