升级XR插件版本
This commit is contained in:
29
Packages/MCPForUnity/Editor/Tools/Vfx/VfxGraphCommon.cs
Normal file
29
Packages/MCPForUnity/Editor/Tools/Vfx/VfxGraphCommon.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
#if UNITY_VFX_GRAPH
|
||||
using UnityEngine.VFX;
|
||||
#endif
|
||||
|
||||
namespace MCPForUnity.Editor.Tools.Vfx
|
||||
{
|
||||
/// <summary>
|
||||
/// Common utilities for VFX Graph operations.
|
||||
/// </summary>
|
||||
internal static class VfxGraphCommon
|
||||
{
|
||||
#if UNITY_VFX_GRAPH
|
||||
/// <summary>
|
||||
/// Finds a VisualEffect component on the target GameObject.
|
||||
/// </summary>
|
||||
public static VisualEffect FindVisualEffect(JObject @params)
|
||||
{
|
||||
if (@params == null)
|
||||
return null;
|
||||
|
||||
GameObject go = ManageVfxCommon.FindTargetGameObject(@params);
|
||||
return go?.GetComponent<VisualEffect>();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user