Commit a748adf 1 parent 40ff828 commit a748adf Copy full SHA for a748adf
File tree 3 files changed +4
-8
lines changed
3 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ internal static void ConvertTo<T>(this Object context) where T : MonoBehaviour
204
204
target . enabled = false ;
205
205
206
206
// Find MonoScript of the specified component.
207
- foreach ( var script in Resources . FindObjectsOfTypeAll < MonoScript > ( ) )
207
+ foreach ( var script in MonoImporter . GetAllRuntimeMonoScripts ( ) )
208
208
{
209
209
if ( script . GetClass ( ) != typeof ( T ) )
210
210
{
Original file line number Diff line number Diff line change 1
1
using System ;
2
+ using System . Diagnostics ;
2
3
using UnityEditor ;
3
4
using UnityEngine ;
4
5
5
6
namespace Coffee . UIEffectInternal
6
7
{
7
8
[ AttributeUsage ( AttributeTargets . Field ) ]
9
+ [ Conditional ( "UNITY_EDITOR" ) ]
8
10
public sealed class PowerRangeAttribute : PropertyAttribute
9
11
{
10
12
public readonly float min ;
Original file line number Diff line number Diff line change @@ -136,14 +136,8 @@ public virtual Material GetModifiedMaterial(Material baseMaterial)
136
136
protected override void OnValidate ( )
137
137
{
138
138
UpdateContext ( context ) ;
139
- ApplyContextToMaterial ( graphic ? graphic . canvasRenderer . GetMaterial ( ) : _material ) ;
140
139
SetVerticesDirty ( ) ;
141
140
SetMaterialDirty ( ) ;
142
-
143
- if ( ! EditorApplication . isPlaying )
144
- {
145
- EditorApplication . QueuePlayerLoopUpdate ( ) ;
146
- }
147
141
}
148
142
149
143
protected override void Reset ( )
@@ -170,7 +164,7 @@ public virtual void SetVerticesDirty()
170
164
if ( graphic )
171
165
{
172
166
graphic . SetVerticesDirty ( ) ;
173
- GraphicProxy . Find ( graphic ) . SetVerticesDirty ( graphic , false ) ;
167
+ GraphicProxy . Find ( graphic ) . SetVerticesDirty ( graphic , enabled ) ;
174
168
#if UNITY_EDITOR
175
169
EditorApplication . QueuePlayerLoopUpdate ( ) ;
176
170
#endif
You can’t perform that action at this time.
0 commit comments