Updaate
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -172,7 +172,7 @@ namespace Invector
|
||||
|
||||
protected virtual void FindPlayer()
|
||||
{
|
||||
var player = GameObject.FindObjectOfType<vThirdPersonController>();
|
||||
var player = GameObject.FindFirstObjectByType<vThirdPersonController>();
|
||||
|
||||
if (player)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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>();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -235,7 +235,7 @@ namespace Invector.vCharacterController
|
||||
if (useGameController)
|
||||
{
|
||||
GameObject gC = null;
|
||||
var gameController = FindObjectOfType<vGameController>();
|
||||
var gameController = FindFirstObjectByType<vGameController>();
|
||||
if (gameController == null)
|
||||
{
|
||||
gC = new GameObject("vGameController_Example");
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
[CreateAssetMenu(menuName = "Invector/SnapBody/New Body Struct")]
|
||||
[CreateAssetMenu(menuName = "BABA_YAGA/Invector/SnapBody/New Body Struct")]
|
||||
public class vBodyStruct : ScriptableObject
|
||||
{
|
||||
public List<Bone> bones = new List<Bone>();
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Invector.DefineSymbolsManager
|
||||
|
||||
public static void CreateDefinitions()
|
||||
{
|
||||
string definesString = PlayerSettings.GetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup);
|
||||
string definesString = PlayerSettings.GetScriptingDefineSymbols(UnityEditor.Build.NamedBuildTarget.FromBuildTargetGroup(EditorUserBuildSettings.selectedBuildTargetGroup));
|
||||
List<string> allDefines = definesString.Split(';').ToList();
|
||||
List<string> allInvectorDefines = new List<string>();
|
||||
|
||||
@@ -70,8 +70,8 @@ namespace Invector.DefineSymbolsManager
|
||||
}
|
||||
currentDefineSymbols.AddRange(targetDefineSymbols.Except(currentDefineSymbols));
|
||||
if (needUpdate)
|
||||
PlayerSettings.SetScriptingDefineSymbolsForGroup(
|
||||
EditorUserBuildSettings.selectedBuildTargetGroup,
|
||||
PlayerSettings.SetScriptingDefineSymbols(
|
||||
UnityEditor.Build.NamedBuildTarget.FromBuildTargetGroup(EditorUserBuildSettings.selectedBuildTargetGroup),
|
||||
string.Join(";", currentDefineSymbols.ToArray()));
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ static class vInspectorSearchTool
|
||||
{
|
||||
// Editor.finishedDefaultHeaderGUI -= DrawInpectorSearchTool;
|
||||
// Editor.finishedDefaultHeaderGUI += DrawInpectorSearchTool;
|
||||
Debug.LogWarning("vInspectorSearchTool: finishedDefaultHeaderGUI is deprecated/removed in Unity 6 and has been disabled.");
|
||||
// Debug.LogWarning("vInspectorSearchTool: finishedDefaultHeaderGUI is deprecated/removed in Unity 6 and has been disabled.");
|
||||
}
|
||||
public static string search;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Invector
|
||||
}
|
||||
static void ThirPersonCameraIcon(int instanceId, Rect selectionRect)
|
||||
{
|
||||
GameObject go = EditorUtility.InstanceIDToObject(instanceId) as GameObject;
|
||||
GameObject go = EditorUtility.EntityIdToObject(instanceId) as GameObject;
|
||||
if (go == null) return;
|
||||
|
||||
var tpCamera = go.GetComponent<vCamera.vThirdPersonCamera>();
|
||||
@@ -25,7 +25,7 @@ namespace Invector
|
||||
|
||||
static void ThirdPersonControllerIcon(int instanceId, Rect selectionRect)
|
||||
{
|
||||
GameObject go = EditorUtility.InstanceIDToObject(instanceId) as GameObject;
|
||||
GameObject go = EditorUtility.EntityIdToObject(instanceId) as GameObject;
|
||||
if (go == null) return;
|
||||
|
||||
var controller = go.GetComponent<Invector.vCharacterController.vThirdPersonController>();
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Invector.vCamera
|
||||
}
|
||||
IEnumerator Start()
|
||||
{
|
||||
tpCamera = FindObjectOfType<vThirdPersonCamera>();
|
||||
tpCamera = FindFirstObjectByType<vThirdPersonCamera>();
|
||||
var collider = GetComponent<Collider>();
|
||||
if (collider)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Invector.vCharacterController
|
||||
{
|
||||
if (_instance == null)
|
||||
{
|
||||
_instance = FindObjectOfType<vMousePositionHandler>();
|
||||
_instance = FindFirstObjectByType<vMousePositionHandler>();
|
||||
}
|
||||
|
||||
if (_instance == null)
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Invector.vShooter
|
||||
using IK;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
[CreateAssetMenu(menuName = "Invector/Shooter/New Weapon IK Adjust")]
|
||||
[CreateAssetMenu(menuName = "BABA_YAGA/Invector/Shooter/New Weapon IK Adjust")]
|
||||
public class vWeaponIKAdjust : ScriptableObject
|
||||
{
|
||||
public const string StandingState = "Standing";
|
||||
|
||||
@@ -3,7 +3,7 @@ using UnityEngine;
|
||||
|
||||
namespace Invector.vShooter
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Invector/Shooter/New Weapon IK Adjust List")]
|
||||
[CreateAssetMenu(menuName = "BABA_YAGA/Invector/Shooter/New Weapon IK Adjust List")]
|
||||
public class vWeaponIKAdjustList : ScriptableObject
|
||||
{
|
||||
[vSeparator("Global Offsets for all Weapons Hand IK target")]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using UnityEngine;
|
||||
namespace Invector.vShooter
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Invector/Shooter/Impact Effects/New Custom ImpactEffect", fileName = "CustomImpactEffect@")]
|
||||
[CreateAssetMenu(menuName = "BABA_YAGA/Invector/Shooter/Impact Effects/New Custom ImpactEffect", fileName = "CustomImpactEffect@")]
|
||||
public class vCustomImpactEffectSample : vImpactEffectBase
|
||||
{
|
||||
public enum Align
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using UnityEngine;
|
||||
namespace Invector.vShooter
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Invector/Shooter/Impact Effects/New ImpactEffect", fileName = "ImpactEffect@")]
|
||||
[CreateAssetMenu(menuName = "BABA_YAGA/Invector/Shooter/Impact Effects/New ImpactEffect", fileName = "ImpactEffect@")]
|
||||
public class vImpactEffect : vImpactEffectBase
|
||||
{
|
||||
public List<GameObject> decals;
|
||||
|
||||
@@ -265,7 +265,7 @@ namespace Invector.vShooter
|
||||
if (useGameController)
|
||||
{
|
||||
GameObject gC = null;
|
||||
var gameController = FindObjectOfType<vGameController>();
|
||||
var gameController = FindFirstObjectByType<vGameController>();
|
||||
if (gameController == null)
|
||||
{
|
||||
gC = new GameObject("vGameController_Example");
|
||||
|
||||
@@ -217,7 +217,7 @@ namespace Invector.vShooter
|
||||
animator = GetComponent<Animator>();
|
||||
if (applyRecoilToCamera)
|
||||
{
|
||||
tpCamera = FindObjectOfType<vCamera.vThirdPersonCamera>();
|
||||
tpCamera = FindFirstObjectByType<vCamera.vThirdPersonCamera>();
|
||||
}
|
||||
ammoManager = GetComponent<vAmmoManager>();
|
||||
if (ammoManager != null)
|
||||
|
||||
@@ -291,7 +291,7 @@ namespace Invector.vCharacterController
|
||||
{
|
||||
if (!_controlAimCanvas)
|
||||
{
|
||||
_controlAimCanvas = FindObjectOfType<vControlAimCanvas>();
|
||||
_controlAimCanvas = FindFirstObjectByType<vControlAimCanvas>();
|
||||
if (_controlAimCanvas)
|
||||
{
|
||||
_controlAimCanvas.Init(cc);
|
||||
@@ -1145,7 +1145,7 @@ namespace Invector.vCharacterController
|
||||
|
||||
if (tpCamera == null)
|
||||
{
|
||||
tpCamera = FindObjectOfType<vCamera.vThirdPersonCamera>();
|
||||
tpCamera = FindFirstObjectByType<vCamera.vThirdPersonCamera>();
|
||||
if (tpCamera == null)
|
||||
{
|
||||
return;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using UnityEngine;
|
||||
namespace Invector.Throw
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Invector/Throw/New ThrowSettings")]
|
||||
[CreateAssetMenu(menuName = "BABA_YAGA/Invector/Throw/New ThrowSettings")]
|
||||
public class vThrowSettings : ScriptableObject
|
||||
{
|
||||
[Tooltip("Align End point UP to surface normal direction")]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using UnityEngine;
|
||||
namespace Invector.Throw
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Invector/Throw/New ThrowVisualSettings")]
|
||||
[CreateAssetMenu(menuName = "BABA_YAGA/Invector/Throw/New ThrowVisualSettings")]
|
||||
public class vThrowVisualSettings : ScriptableObject
|
||||
{
|
||||
[vSeparator("Visual Line")]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using UnityEngine;
|
||||
namespace Invector.vShooter
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Invector/Shooter/New BulletLifeSettings")]
|
||||
[CreateAssetMenu(menuName = "BABA_YAGA/Invector/Shooter/New BulletLifeSettings")]
|
||||
public class vBulletLifeSettings : ScriptableObject
|
||||
{
|
||||
public List<vBulletLostLife> bulletLostLifeList;
|
||||
|
||||
@@ -233,8 +233,9 @@ namespace Invector.vShooter
|
||||
onDisable.Invoke();
|
||||
}
|
||||
|
||||
protected virtual void Start()
|
||||
protected override void Start()
|
||||
{
|
||||
base.Start();
|
||||
if (!reloadSource)
|
||||
{
|
||||
reloadSource = source;
|
||||
|
||||
Reference in New Issue
Block a user