This commit is contained in:
2026-06-08 23:25:33 +07:00
parent 4d83b4cdc8
commit b8b222632d
131 changed files with 21412 additions and 572 deletions

View File

@@ -260,7 +260,7 @@ namespace Invector.vMelee
if (useGameController)
{
GameObject gC = null;
var gameController = FindObjectOfType<vGameController>();
var gameController = FindFirstObjectByType<vGameController>();
if (gameController == null)
{
gC = new GameObject("vGameController_Example");

View File

@@ -172,7 +172,7 @@ namespace Invector
protected virtual void FindPlayer()
{
var player = GameObject.FindObjectOfType<vThirdPersonController>();
var player = GameObject.FindFirstObjectByType<vThirdPersonController>();
if (player)
{

View File

@@ -55,7 +55,7 @@ namespace Invector.vCharacterController
{
if (_instance == null)
{
_instance = GameObject.FindObjectOfType<vHUDController>();
_instance = GameObject.FindFirstObjectByType<vHUDController>();
//Tell unity not to destroy this object when loading a new scene
//DontDestroyOnLoad(_instance.gameObject);
}

View File

@@ -19,7 +19,7 @@ namespace Invector.vCharacterController
{
if (_instance == null)
{
_instance = GameObject.FindObjectOfType<vInput>();
_instance = GameObject.FindFirstObjectByType<vInput>();
if (_instance == null)
{
_instance = new GameObject("vInputType").AddComponent<vInput>();

View File

@@ -147,7 +147,7 @@ namespace Invector.vCharacterController
public virtual void FindCamera()
{
var tpCameras = FindObjectsOfType<vCamera.vThirdPersonCamera>();
var tpCameras = FindObjectsByType<vCamera.vThirdPersonCamera>(FindObjectsSortMode.None);
if (tpCameras.Length > 1)
{
@@ -591,7 +591,7 @@ namespace Invector.vCharacterController
if (tpCamera == null)
{
tpCamera = FindObjectOfType<vCamera.vThirdPersonCamera>();
tpCamera = FindFirstObjectByType<vCamera.vThirdPersonCamera>();
if (tpCamera == null)
{
return;