Console noise purge: deprecated-API fixes + PixelArtDevControls legacy-Input exception
MenuUi FindAnyObjectByType; GA prefabAssetPath->assetPath x2; Synty sample FindObjectsByType overload; dead death_b field removed. Real bug caught by the sweep: the F3 pixel-art toggle used legacy Input.GetKeyDown under Input System-only handling -> InvalidOperationException every frame in Play. Suite green (455). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+3
-3
@@ -1,4 +1,4 @@
|
||||
using System.Collections;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using System.IO;
|
||||
@@ -88,7 +88,7 @@ namespace GAP_ParticleSystemController
|
||||
static string GetPrefabFolder2018_3 (GameObject prefabVFX)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
string prefabPath = UnityEditor.SceneManagement.PrefabStageUtility.GetPrefabStage(prefabVFX).prefabAssetPath;
|
||||
string prefabPath = UnityEditor.SceneManagement.PrefabStageUtility.GetPrefabStage(prefabVFX).assetPath;
|
||||
string prefabFolderPath = Path.GetDirectoryName (prefabPath);
|
||||
return prefabFolderPath;
|
||||
#else
|
||||
@@ -102,7 +102,7 @@ namespace GAP_ParticleSystemController
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
var prefabStage = UnityEditor.SceneManagement.PrefabStageUtility.GetPrefabStage(prefab);
|
||||
UnityEditor.PrefabUtility.SaveAsPrefabAsset(prefabStage.prefabContentsRoot, prefabStage.prefabAssetPath);
|
||||
UnityEditor.PrefabUtility.SaveAsPrefabAsset(prefabStage.prefabContentsRoot, prefabStage.assetPath);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Synty.Interface.SciFiSoldierHUD.Samples
|
||||
private void GetSliders()
|
||||
{
|
||||
#if UNITY_2022_1_OR_NEWER
|
||||
sliders = FindObjectsByType<Slider>(FindObjectsInactive.Exclude, FindObjectsSortMode.None).ToList();
|
||||
sliders = FindObjectsByType<Slider>(FindObjectsInactive.Exclude).ToList();
|
||||
#else
|
||||
sliders = FindObjectsOfType<Slider>().ToList();
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* POLYGON DOG ANIMATION SCRIPT
|
||||
* DESCRIPTION: This script demonstrates the range of animations and Prefabs included in
|
||||
* Polygon Dog which can be customized for the users preference. Please attach this to the
|
||||
@@ -83,7 +83,6 @@ public class POLYGON_DogAnimationController : MonoBehaviour
|
||||
public float timeRemaining = 1.0f;
|
||||
private int countDown = 1;
|
||||
bool Movement_f;
|
||||
bool death_b = false;
|
||||
bool Sleep_b = false;
|
||||
bool Sit_b = false;
|
||||
private float w_movement = 0.0f; // Run value
|
||||
|
||||
@@ -52,7 +52,8 @@ namespace ProjectM.Client
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.F3))
|
||||
var kb = UnityEngine.InputSystem.Keyboard.current; // legacy Input throws under active Input System handling
|
||||
if (kb != null && kb.f3Key.wasPressedThisFrame)
|
||||
_open = !_open;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace ProjectM.Client
|
||||
|
||||
public static void EnsureEventSystem()
|
||||
{
|
||||
if (UnityEngine.Object.FindFirstObjectByType<EventSystem>() != null) return;
|
||||
if (UnityEngine.Object.FindAnyObjectByType<EventSystem>() != null) return;
|
||||
var go = new GameObject("EventSystem");
|
||||
go.AddComponent<EventSystem>();
|
||||
go.AddComponent<InputSystemUIInputModule>();
|
||||
|
||||
Reference in New Issue
Block a user