mirror of
https://github.com/mob-sakai/UIEffect.git
synced 2026-11-19 17:22:37 +08:00
fix: fix potential issues
This commit is contained in:
@@ -204,7 +204,7 @@ namespace Coffee.UIEffectInternal
|
||||
target.enabled = false;
|
||||
|
||||
// Find MonoScript of the specified component.
|
||||
foreach (var script in Resources.FindObjectsOfTypeAll<MonoScript>())
|
||||
foreach (var script in MonoImporter.GetAllRuntimeMonoScripts())
|
||||
{
|
||||
if (script.GetClass() != typeof(T))
|
||||
{
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Coffee.UIEffectInternal
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field)]
|
||||
[Conditional("UNITY_EDITOR")]
|
||||
public sealed class PowerRangeAttribute : PropertyAttribute
|
||||
{
|
||||
public readonly float min;
|
||||
|
||||
@@ -136,14 +136,8 @@ namespace Coffee.UIEffects
|
||||
protected override void OnValidate()
|
||||
{
|
||||
UpdateContext(context);
|
||||
ApplyContextToMaterial(graphic ? graphic.canvasRenderer.GetMaterial() : _material);
|
||||
SetVerticesDirty();
|
||||
SetMaterialDirty();
|
||||
|
||||
if (!EditorApplication.isPlaying)
|
||||
{
|
||||
EditorApplication.QueuePlayerLoopUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Reset()
|
||||
@@ -170,7 +164,7 @@ namespace Coffee.UIEffects
|
||||
if (graphic)
|
||||
{
|
||||
graphic.SetVerticesDirty();
|
||||
GraphicProxy.Find(graphic).SetVerticesDirty(graphic, false);
|
||||
GraphicProxy.Find(graphic).SetVerticesDirty(graphic, enabled);
|
||||
#if UNITY_EDITOR
|
||||
EditorApplication.QueuePlayerLoopUpdate();
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user